On Sun, Nov 1, 2020 at 1:40 AM TK Chia wrote: > >> But this GW-BASIC seems to treat "TIMER" as a variable, so it's the > >> same as > >> typing: > >> RANDOMIZE 0 > >> or any uninitialized variable: (which are set to zero) > > I checked the release GW-BASIC code. I think it does kind of recognize > a TIMER keyword --- when it is in tokenized form --- but it is > considered to be an "Advanced Feature" (i.e. not supported in this > GW-BASIC version). > > Other such "advanced" tokens are ERDEV (and likely ERDEV$), IOCTL (+ $), > CHDIR, MKDIR, RMDIR, SHELL, ENVIRON (+ $), VIEW, WINDOW, and PMAP. The > implementations are stubbed out in GWSTS.ASM in the source.
Ah, that makes sense. And correlates with Steve's comment that "The TIMER function only exists in GW-BASIC 2 and later." > >> However, a workaround is to use the value from the system time (TIME$) > >> and > >> use only the seconds. You can do that with the MID$() function. > >> LET SEED = VAL(MID$(TIME$,7,2)) > >> That picks up only the seconds from the system time. > > I think an improvement to this work-around would be to use more of the > TIME$ value, including the hours and minutes. Picking up only the > seconds field means that there are only 60 possible seed values. > > Yes, you're right. The best way is to pick up all the TIME$ values. Jim
_______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel