The Liberty BASIC DATE$() function is a little unusual in sometimes returning a string and sometimes returning a number, depending on the parameter supplied. Indeed that feature seems to confuse LB 4.04, for example it will accept the following code without error:
Code:
You would expect that to raise a 'Type mismatch' error (since it is attempting to assign a numeric value to a string variable) but it doesn't. However it leaves LB in a confused state because an error may be raised in a subsequent statement that accesses the count$ variable.
For maximum compatibility, LBB will accept both these forms without generating an error, and the resulting variable (whether numeric or string) is entirely valid:
Code: count = date$("days") ' correct according to the LB help documents
count$ = date$("days") ' equivalent to count$ = str$(date$("days"))
Richard.