TIME$() - arguments seem to be case sensitive

From Liberty BASIC Family
Revision as of 03:03, 11 October 2023 by StPendl (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Description

If one does not use all lower case letters for the arguments of the time$() function, the result will be as if no argument would have been specified.

Parsing of the arguments should be case insensitive in my opinion, since there is no advantage in allowing only one way.

Example code to demonstrate the bug.

    print time$("seconds")
    print time$("SECONDS")
    print time$("Seconds")
    print time$("ms")
    print time$("MS")
    print time$("Ms")
    print time$("milliseconds")
    print time$("MILLISECONDS")
    print time$("Milliseconds")

Example code to work around the bug.

    print time$("seconds")
    print time$("ms")
    print time$("milliseconds")