Page 1 of 1
					
				newbie question
				Posted: Fri Sep 12, 2003 8:17 pm
				by Jurgen
				why is there a .l after these fields ?
Code: Select all
Structure FileDef 
op.l 
hFile.l 
dataptr.l 
datalen.l 
keyptr.l 
keylen.l 
keyno.l 
EndStructure 
OpenResult.l
 
			
					
				
				Posted: Fri Sep 12, 2003 8:23 pm
				by Kale
				From help manual:
To declare a variable in PureBasic, simply type its name. You can also specify the type you want this variable to be. Variables do not need to be explicitly declared, as they can be used as "variables on-the-fly". The 'DefType' keyword can be used to declare multiple variables in one statement. 
Example :
a.b ; Declare a variable called 'a' from byte (.b) type.
c.l = a*d.w ; 'd' is declared here within the expression !
Basic types 
PureBasic allows type variables. Theses types are signed and can be standard integers, floats numbers or even string characters. Here is the list of the native supported types and a brief description :
Name Extension Memory consumption Range 
Byte .b 1 byte in memory -128 to +127 
Word .w 2 bytes in memory -32768 to +32767  
Long .l 4 bytes in memory -2147483648 to +2147483647 
Float .f 4 bytes in memory unlimited (see below) 
String .s length of the string + 1 Up to 65536 characters
 
 
 
			
					
				
				Posted: Fri Sep 12, 2003 8:26 pm
				by Jurgen
				thanks 
