'RANDOM' Problem

benbaker7

Active member
Hi Folks .... In experimenting with RANDOM, and following the detail on pt2 p177 of the manual, I've encountered a problem. In the first code snippet half way down the page, the use of 'timer' generates the error message " 'timer' is an unknown symbol". However, using 'time' as in the second snippet executes fine with the simulator, as in:

start:
let w0=time
random w0
pause 1000
goto start

Further, neither 'time' or 'timer' are listed in my manual v7.9.2 10/2015, which appears to be the latest, but I did find a page on 'time' in the separate alpha basic commands page, but no reference to 'timer'.

I'm using an 18M2 and PE5, and it occurred to me that perhaps for some reason 'timer' is only applicable to PE6 ( I've disabled my copy of PE6, as on my XP machine, it takes frustratingly far too long to load, and I'm really only comfortable with PE5).

I'd appreciate some advice, please,.

Ben Baker
 

AllyCat

Senior Member
Hi,

"Time" applies only in M2 PICaxes and "Timer" only to X2 chips. Also "time" is a variable not a command , so doesn't normally appear in command lists. However, this caused so much confusion that time is included in the on-line Command Reference.

Sorry no links as I'm writing this on my phone, but AFAIK this is not a PE5 v PE6 issue.

Cheers, Alan.
 

benbaker7

Active member
Hi,

"Time" applies only in M2 PICaxes and "Timer" only to X2 chips. Also "time" is a variable not a command , so doesn't normally appear in command lists. However, this caused so much confusion that time is included in the on-line Command Reference.

Sorry no links as I'm writing this on my phone, but AFAIK this is not a PE5 v PE6 issue.

Cheers, Alan.
I see what you mean, Alan. I told the simulator that I was using a 28X2 and it worked fine, although the preceding para to snippet the first does indicate M2 functionality. Thanks for your reply.

Ben Baker
 

lbenson

Senior Member
Further, neither 'time' or 'timer' are listed in my manual v7.9.2 10/2015, which appears to be the latest, but I did find a page on 'time' in the separate alpha basic commands page, but no reference to 'timer'.
"time" has 164 mentions and "timer" 86 mentions in my version of manual 2, dated 10/2015.

As Alan says, "time" and "timer" are system variables, not commands. It is a PE5 vs PE6 issue with respect to "time", though; the following works in PE6 but doesn't in PE5:
Code:
time=0
pause 10000
sertxd(#time,13,10)
 

benbaker7

Active member
"time" has 164 mentions and "timer" 86 mentions in my version of manual 2, dated 10/2015.

As Alan says, "time" and "timer" are system variables, not commands. It is a PE5 vs PE6 issue with respect to "time", though; the following works in PE6 but doesn't in PE5:
Code:
time=0
pause 10000
sertxd(#time,13,10)
Thankyou. One should always be specific! I should have said 'no specific mention of TIME or TIMER in the Contents'. I take the mild rebuke re number of mentions of time/timer in the spirit it was intended! So did your boilerplate search also indicate page nos, and if so, how did you do it? But thanks for the reply anyway.

Ben Baker
 

AllyCat

Senior Member
Hi,
Code:
time=0
pause 10000
sertxd(#time,13,10)
Hmm, that compiles perfectly in my PE5 v 5.5.5 (not even with the upgrade overlay to PE5.5.6).

The (optional) Command Keyword associated with "variables" such as time and pins, etc. is "LET", where more information could be found.

But my main "complaint" is the Forum search which rejects 3-character "words". That makes it very difficult to search for acronyms like AGC, VHF, ADC, DAC, etc., etc. and even my recent attempt "FYI:" to make a significant post more "findable" in the future.

Cheers, Alan.
 
Top