|
|
|
|
|
The & operator returns the address of a variable as an integer. i is int
z is string ASCIIZ on 50
t is array of 10 reals
s is composed of
L_Age is int
Le_Nom is string ASCIIZ on 50
END
adr is int
adr = & i
adr = & z
adr = & z + 2
adr = & t
adr = & t[5]
adr = & s
adr = & s.L_Age
adr = & s.Le_Nom
Sintaxis
<Result> = &<Variable Name>
<Result>: Integer Address of the specified variable. <Variable name>: Any type Name of variable to use. Observaciones - The & operator is used to find out the address of any type of variable (simple and composite variables).
- The & operator is mainly used to pass addresses to API or CallDLL32.
- The & operator cannot be used to retrieve the address:
- of a control,
- an HFSQL section.
The & operator displays an error then when compiling the project. Indeed, the addresses of these two elements may change at any time.
- If a "String" is to be passed by address to function API or CallDLL32, don't use a String variable: the string address can change at any time.. we recommend that you use the ASCIIZ String type.
- If the variable is a local variable, the value returned by the & operator must only be used in the process where the variable was declared. When the current process is ended, the address will be invalid and it must not be used anymore.
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|