home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 19 / AACD19.BIN / AACD / Programming / YAEC / testsrc / stringlist.e < prev    next >
Encoding:
Text File  |  2001-02-23  |  763 b   |  35 lines

  1.  
  2. PROC main()
  3.    DEF a[100]:STRING, b:PTR TO LONG, x
  4.    a := 'hej\n'
  5.    PutStr(a)
  6.    b := String(100)
  7.    PrintF('\d\n', StrMax(b))
  8.    StrCopy(b, 'hej\n')
  9.    PutStr(b)
  10.    PrintF('hej, \d\n', FastNew(256))
  11.    b := NEW [12, 13, 14, 15]
  12.    PrintF('\d,\d,\d,\d,\d,\d\n', Int(Any(b)-4), Int(Any(b)-2), b[0], b[1], b[2], b[3])
  13.    PUSH 23
  14.    ForAll(b, `PrintF('pos \d = \d\n', \y, \x))
  15.    POP x
  16.    PrintF('x=\d\n', x)
  17.    Exists(b, `\x=14, `PrintF('yes, at pos \d\n', \y))
  18.  
  19.    rPrintAll([["h", "e", [["l"]], "l"],
  20.               ["o", [" "], ["t", "h"]],
  21.               ["e", [], "r", ["e","!","!"],
  22.               "!"]
  23.              ]
  24.             )
  25.    PrintF('\n')
  26. ENDPROC NIL
  27.  
  28. PROC rPrintAll(l)
  29.    ForAll(l, `IF \x > 256 THEN rPrintAll(\x) ELSE PrintF('\c', \x))
  30. ENDPROC
  31.  
  32.  
  33.  
  34.  
  35.