I understand in the meantime that pointers are important.
It is also best to avoid global variables and that it is better to use structures.
The examples in the manual are not clear to me.
Is it always better and faster to change variables via pointers ?
But how to do this?
;structure test
Code: Select all
EnableExplicit
Structure test
a.i
b.i
d.s
EndStructure
Define one.test ;
Define two.test
Define *pointer1,*pointer2
*pointer1=@one ;adres one
*pointer2=@two ;adres two
one\a=10
one\b=20
one\d="test"
two\a=20
two\d="other"
Debug one\d ;"test"
Debug two\a ;20
Debug two\d ;"other"
*pointer1\a=100 ;change one\a to 100 or change one\b how do i this ?
how to read one\a via a pointer ?
Procedure change_something(*pointer1)
how can I change a,b,c,d with pointers
EndProcedure
Debug one\a