Post Reply 
New to programming...help !
05-19-2015, 06:55 AM
Post: #7
RE: New to programming...help !
(05-19-2015 06:36 AM)Didier Lachieze Wrote:  
(05-19-2015 06:18 AM)Digitaldreams Wrote:  What is the function of ':' after a variable ??

With "TIC=TICKS()" you get the result of the test "TIC equal TICKS()" which in your case in false (zero).
With "TIC:=TICKS()" you assign the value of TICKS() to the the variable TIC, it's the same as with the Sto command "TICKS()â–¶TIC" where you store the value to TICKS() into the TIC variable.

So in your original program you were comparing TIC to TICKS(), then TIC to TIC/1000 but never assigning a value to TIC, so the default value (zero) assigned to TIC at its creation by the "LOCAL TIC;" statement was printed.

Thanks again Didier !....I'm sure with other devices I've used, if you want to comparison test you would enter '==' !, no wonder It confused me Smile

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:55 AM



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