PB5.11 compiler misses an undeclared variable
Posted: Mon Jun 17, 2013 2:25 pm
Why the compiler misses an undeclared variable?
Code: Select all
EnableExplicit
EnableASM
mov ebx, *Point
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
EnableExplicit
EnableASM
mov ebx, *Point
Maybe you should have first a look to the name conventions for ASMUser_Russian wrote:Why the compiler misses an undeclared variable?Code: Select all
EnableExplicit EnableASM mov ebx, *Point
PureBasic manual wrote:You have several rules to closely follow if you want to include ASM in a BASIC code :
- The used variables or pointers must be declared before to use them in an assembler keyword
I think that is the OP's point - he does not declare *Point but he does not get an error, which is contrary to the expected behaviour (and your quote from the user manual). Or at least that is what it looks like he is saying.PB wrote:> Maybe you should have first a look to the name conventions for ASM
Josh is right. Using inline ASM doesn't follow the standard rules. See here (italics mine):
PureBasic manual wrote:You have several rules to closely follow if you want to include ASM in a BASIC code :
- The used variables or pointers must be declared before to use them in an assembler keyword