Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
val [2019/05/31 22:04] neilsval [2019/06/02 21:32] (current) – [Parsing rules for VAL()] neils
Line 15: Line 15:
   * The string contains any non-numeric character, including a space   * The string contains any non-numeric character, including a space
   * The numeric value exceeds 255   * The numeric value exceeds 255
 +
 +===== Parsing rules for VAL() =====
 +
 +The ''VAL()'' function will return 0 if:
 +
 +  * The argument points to an empty string
 +  * The string is longer than 6 characters
 +  * The string contains any non-numeric character, except for the first character which can be a minus sign (''-'')
 +  * The numeric value is less than -32768 or greater than +32767
  
 ===== Parsing rules for VAL%() ===== ===== Parsing rules for VAL%() =====
  
 The ''VAL%()'' function is hardwired to the equivalent function in BASIC ROM, please refer to [[https://www.c64-wiki.com/wiki/VAL|this page]] for parsing rules. The ''VAL%()'' function is hardwired to the equivalent function in BASIC ROM, please refer to [[https://www.c64-wiki.com/wiki/VAL|this page]] for parsing rules.