I was playing around with some code I tripped upon in the manual, but I really don't quite get what the manual is telling me.
I thought the manual was telling me I could declare an equates using a string for the value, but what I don't get is why CVQ would work but CVDWD or CVL do not?
At first I thought it was the length of the string (1 char = 1 byte) but that does not seem to be it.
What am I missing????? (Or completely misunderstanding????)
I thought the manual was telling me I could declare an equates using a string for the value, but what I don't get is why CVQ would work but CVDWD or CVL do not?
At first I thought it was the length of the string (1 char = 1 byte) but that does not seem to be it.
What am I missing????? (Or completely misunderstanding????)
Code:
#COMPILE EXE #DIM ALL #INCLUDE "Win32Api.inc" TYPE Form FrmName AS ASCIIZ * %MAX_PATH END TYPE TYPE FrmButton BtnName AS ASCIIZ * %MAX_PATH BtnCaption AS ASCIIZ * %MAX_PATH BtnTop AS DWORD BtnLeft AS DWORD BtnHeight AS DWORD BtnWidth AS DWORD END TYPE %Form1 = CVQ("FrmForm133333333333333333333333333333333333333333333") '%Form2 = CVDWD("F") 'Uncomment for error '%Form3 = CVl("Form") 'Uncomment for error %Button1 = CVQ("Button1") %Button2 = CVQ("Button2") %Form = CVQ("Form") %Button = CVQ("Button") %Button3 = %BUTTON + 1 %Button4 = %BUTTON + 2 FUNCTION PBMAIN () AS LONG MSGBOX STR$(%FORM1) + $CR + STR$(%BUTTON1) + $CR + STR$(%BUTTON1) MSGBOX STR$(%FORM) + $CR + STR$(%BUTTON) ' MSGBOX STR$(%FORM2) 'Uncomment for error MSGBOX STR$(%FORM) + $CR + STR$(%BUTTON3) + $CR + STR$(%BUTTON4) END FUNCTION
Comment