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
strings [2019/08/02 21:58] – [Value assigment] neilsstrings [2021/01/10 19:38] (current) – [Value assigment] gabrielsroka
Line 36: Line 36:
  
 The maximum string length is 255 characters.  A string is considered to be invalid if it contains more than 255 consecutive bytes without a terminator (null byte). The longest valid string contains 255 bytes plus a null byte. The maximum string length is 255 characters.  A string is considered to be invalid if it contains more than 255 consecutive bytes without a terminator (null byte). The longest valid string contains 255 bytes plus a null byte.
-===== Value assigment =====+===== Value assignment =====
  
 String pointers can only be assigned an address, not a string value. For example, if you run this program: String pointers can only be assigned an address, not a string value. For example, if you run this program:
Line 84: Line 84:
   print a$   print a$
      
-In the example above, ''strbuffer!'' is an array of 256 bytes. The ''@'' (address-of) operator returns the start address of the array and assigns it to ''a$''. Now ''a$'' points to a working space where your can store keyboard input.+In the example above, ''strbuffer!'' is an array of 256 bytes. The ''@'' (address-of) operator returns the start address of the array and assigns it to ''a$''. Now ''a$'' points to a working space where you can store keyboard input.
  
 To define a 40 characters long string and initialize it to empty (zero length), you can write the following code: To define a 40 characters long string and initialize it to empty (zero length), you can write the following code: