This code , makes the last line append wrongly at the line before last unless one breaks up the locate into locate(x,) : locate(,y) :
P.S.
Not sure if it is a screw up of mine or if it is the locate , but if one changes "For b = 1 to (winheight/16)" to "For b = 1 to int(winheight/16)" then it do not append wrongly. When "For b = 1 to (winheight/16)" then one have to set the locate part to "locate (b,) : locate (,1+(t*Len(mystring)))" else it will append last line to the line before last .
(?)
Code: Select all
#include "fbgfx.bi"
Using FB ' namespace
dim as integer monitorwidth,monitorheight,winwidth,winheight,b,c,t
Dim as string mystring
screeninfo monitorwidth,monitorheight
winwidth=monitorwidth-100 : winheight=monitorheight-100
screenres winwidth,winheight,,, GFX_NO_FRAME : Width winwidth\8, winheight\16
Cls
mystring="abcdefghijklmnopqrstuvwxyz"
c=(int(int(winwidth/8)/len(mystring))-1)
For b = 1 to (winheight/16)
For t = 0 to c
locate (b,1+(t*Len(mystring)))
' locate (b,) : locate (,1+(t*Len(mystring)))
Print ; mystring ;
next t
Next b
Sleep