Post Reply 
New to programming...help !
05-19-2015, 06:18 AM
Post: #5
RE: New to programming...help !
(05-19-2015 03:22 AM)Didier Lachieze Wrote:  [quote='Digitaldreams' pid='35504' dateline='1431988787']
Tried to print ticks divided by 1000 yet get a line of zero's ?. What is wrong with the below ?. Also what is the command to print at a particular location on the screen ?.

You got a line of zero's because you used "TIC=" instead of "TIC:=".
PRINT is printing to the terminal with each PRINT being on a different line, so if you want to print to a particular location on the screen you should use TEXTOUT_P instead of PRINT:

[code]EXPORT TEST()
BEGIN
LOCAL TIC;
RECT();

REPEAT
TIC:=TICKS()/1000;
TEXTOUT_P(STRING(TIC),0,0,0,0,100,#FFFFFF);
UNTIL GETKEY>-1 ;

END;[/code ]
[/quote ]

Thanks Didier......I shortened it too by removing TIC altogether. What is the function of ':' after a variable ??

Regards
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: New to programming...help ! - Digitaldreams - 05-19-2015 06:18 AM



User(s) browsing this thread: 1 Guest(s)