I DIM the variable temp$, but use temp in the code - yet the compiler doesn't complain. Is that the way it's supposed to be?
Code:
#Compile Exe #Dim All #Include "win32api.inc" Function PBMain() As Long Local hDlg As Dword Dialog New Pixels, 0, "Button Test",300,300,200,200, %WS_OverlappedWindow To hDlg Control Add Button, hDlg, 100,"Push", 50,10,100,20 Dialog Show Modal hDlg Call DlgProc End Function CallBack Function DlgProc() As Long Dim temp$ temp = "s" If Cb.Msg = %WM_Command And Cb.Ctl = 100 And Cb.CtlMsg = %BN_Clicked Then 'test code End If End Function
Comment