So, have you remembered to add the promised constant to PB 5.72 ?Fred wrote:Just forgotten. Moved to feature request.
Detect whether PB 5.70 DPi flag is checked
Re: Detect whether PB 5.70 DPi flag is checked
Message to Fred :
"That's not a bug..." said the programmer. "it's a feature! "
"Oh! I see..." replied the blind man.
"Oh! I see..." replied the blind man.
Re: Detect whether PB 5.70 DPi flag is checked
Since PB 5.73 has just been released with still no sign of the promised constant, here is a modified version of the Assembly language code to test whether the DPi_aware option is checked.
I came to this solution after reading carefully (and finally understanding...) the inline assembler entry of the Help file. It really does not get much simpler than the following single Assembly language command :
I kept the PB ASM commands pair outside the procedure only for the sake of greater clarity. It would, of course, make better sense inside the procedure.
I came to this solution after reading carefully (and finally understanding...) the inline assembler entry of the Help file. It really does not get much simpler than the following single Assembly language command :
Code: Select all
EnableASM
Procedure.i DPi_option_checked()
MOV eax, dword [PB_Compiler_DPIAware]
ProcedureReturn
EndProcedure
DisableASM
If DPi_option_checked()
; do this and that
EndIf
Debug "DPi_option_checked() ? " + DPi_option_checked()
"That's not a bug..." said the programmer. "it's a feature! "
"Oh! I see..." replied the blind man.
"Oh! I see..." replied the blind man.