User Tools

Site Tools


fb_variables

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
fb_variables [2022/12/04 01:35] – [CONST] praetorfb_variables [2022/12/04 01:39] (current) – [CONST] praetor
Line 21: Line 21:
 dim as string personName dim as string personName
 dim as integer personAge dim as integer personAge
-dim as float radius+dim as single radius
  
 dim as integer x,y dim as integer x,y
Line 32: Line 32:
 CONST variables are constants, that is their assigned value does not change. An example would be CONST variables are constants, that is their assigned value does not change. An example would be
 <code freebasic> <code freebasic>
-const as float pi = 3.14+const as single pi = 3.14
 </code> </code>
  
Line 40: Line 40:
 ^ Variable types ^ ^ Variable types ^
 | integers | Any whole number that is neither a decimal nor a fraction | | integers | Any whole number that is neither a decimal nor a fraction |
-float | Any number with a decimal place |+single | Any number with a decimal place (single precision) |
 | string | A string of characters | | string | A string of characters |
  
Line 53: Line 53:
  
 <code freebasic> <code freebasic>
-dim as integer +dim as integer a 
-dim as integer +dim as integer b 
-dim as integer+dim as integer c
  
 a = 5 a = 5
Line 69: Line 69:
 First First
 <code freebasic> <code freebasic>
-dim as integer +dim as integer a 
-dim as integer +dim as integer b 
-dim as integer+dim as integer c
 </code> </code>
 declares 3 variables of the integer type. declares 3 variables of the integer type.
fb_variables.1670117703.txt.gz · Last modified: 2022/12/04 01:35 by praetor