Welcome, Guest. Please login or register.

Author Topic: AmigaBasic revisited  (Read 5021 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: AmigaBasic revisited
« on: February 18, 2003, 03:03:07 PM »
Oh dear...

Here is how it could work:

len = 0
for i=32  to 255
   print chr$(i);
   len = len + 1
   if len >= 25 then
      print
      len = 0
   endif
next

Note: characters below 32 are not printable

Example 2:

a$ = ""
for i=32 to 255
   a$ = a$ + chr$(i)
   if len(a$) >= 25 then
      print a$
      a$ = ""
   endif
next

Example 3:

for i = 32 to 231 step 25
   for j=0 to 24
      print chr$(i+j);
   next
   print
next
for j=232 to 255
   print chr$(j);
next
print

Note: this one would work better if the line length (25) was a divider of 256 (e.g. 32).

Bye,
Thomas