Posted: Tue Mar 07, 2006 8:14 pm
normal floats are enough since the main purpose of this scripting language is for games or general apps, not engineering calculators 

http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
;-------------------
var = 123
Debug var
;-------------------
PokeL(@var,456)
Debug PeekL(@var)
Debug var
;-------------------
*ptr.LONG = @var
*ptr\l = 789
Debug *ptr\l
Debug var
;-------------------
Code: Select all
; *ptr.LONG = @var
LEA eax,[v_var]
MOV dword [p_ptr],eax
;
; *ptr\l = 789
MOV ebp,dword [p_ptr]
MOV dword [ebp],789
Code: Select all
MOV ebp, 789
Code: Select all
string$ = "hello i'm a purebasic string !"
Debug "StructuredPointer method"
*pointer.CHARACTER = @string$
While *pointer\c
Debug Chr(*pointer\c)
*pointer + 1
Wend
Debug "PeekC() method"
*pointer = @string$
While PeekC(*pointer)
Debug Chr(PeekC(*pointer))
*pointer + 1
Wend
Code: Select all
Procedure test( *a.LONG, *b.BYTE, *c.WORD )
*a\l = 123456789
*b\b = 127
*c\w = 32000
EndProcedure
test( @arg1.l, @arg2.b, @arg3.w )
Debug arg1
Debug arg2
Debug arg3
Code: Select all
Procedure LowerCase( *hString.CHARACTER )
While *hString\c
Select *hString\c
Case 65 To 90 : *hString\c + 32
EndSelect
*hString + 1
Wend
EndProcedure
Procedure UpperCase( *hString.CHARACTER )
While *hString\c
Select *hString\c
Case 97 To 122 : *hString\c - 32
EndSelect
*hString + 1
Wend
EndProcedure
hello$ = "Hello i'm a PureBasic string !"
LowerCase(@hello$) : Debug hello$
UpperCase(@hello$) : Debug hello$