Restored from previous forum. Originally posted by Denis.
Hi,
is it possible to get an adress of a string constant in PB ?
i.e.
#Try ="PB"
adress.l
i want to put the adress of #Try into adress
adress=@#Try don't run (@ only for variable)
(if #Try is not used before, PB compiler doesn't declare it in ASM; but even if it used before, i don't be able to get the adress even using ASM code)
Restored from previous forum. Originally posted by Danilo.
How do you get a pointer to a constant in ASM ??
IMO, thats not possible. Constants are 'nothing', they
are not compiled nor assembled in the executable.
For strings, its the same in ASM: you can get a pointer
to the string, thats all.
Constants are values (or strings) that give a value
at compile/assemble time, thats very different from
variables.
Restored from previous forum. Originally posted by tinman.
Originally posted by Danilo
How do you get a pointer to a constant in ASM ??
IMO, thats not possible. Constants are 'nothing', they
are not compiled nor assembled in the executable.
Maybe Denis means getting the address of the string contents in the executable (as they would need to be stored somewhere if they are used in the program)?
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
Restored from previous forum. Originally posted by Denis.
Hi Danilo and Tinman.
‘In ASM, Constants are 'nothing', they are not compiled nor assembled in the executable’.
I agree with you, you are completely right. I wrote a big Stupidity about ASM constants...
It is because I thought of the way witch string constants are declared in ASM by PB, i.e. in data section. PB Constants are different from those in ASM
‘Maybe Denis means getting the address of the string contents in the executable (as they would need to be stored somewhere if they are used in the program)?’
You’re right Tinman. That’s what I wanted to do.