[ FAQ ]

Frequently Asked Questions

If, after reading the iziBasic docs, you still have questions, check here.

If you don't find your answer here, please ask the friendly folks in the iziBasic forum .


What does "izi" in "iziBasic" mean?
"izi" means "easy", hence "iziBasic" is "easy" Basic.

Compiler Errors

Why do I get a syntax error when I try to declare a variable called maxRows?
Unlike most other BASIC dialects, iziBasic requires custom variables to start with %, and end with % (for numbers) or $ (for strings):

Why do I get syntax errors in statements that look fine?
Common causes of syntax errors:

Why am I getting syntax errors in my SELECT CASE statements?

Runtime Problems

My program compiles but doesn't run right. I've checked the code several times. What's wrong?

Data Files

I'm trying to use OPEN to read/write files, but nothing happens. Why?

Does the FILEEXISTS command want a full file name (e.g. "foobar.pdb") or just the root name (e.g. "foobar")?
Like the other file commands, just use the root with no file extension.

Detecting an Open Menu with Doevents

My app periodically writes to the screen. I also use a menu (MBAR resource) and when the menu is opened, my code overwrites it. What’s going on?
If the menu has been opened, further writes to the screen will not appear on the form but, instead, on the active menu, thereby overwriting it. Trapping the menu item with doevents will not prevent this because doevents does not return an event if the menu has been opened, only if a menuitem has been ticked (event 1001). The simple code below modifies doevents, and returns a new event 1003 if the menu has been opened but no item yet selected. Your code can then check for event 1003 and stop further screen updates until the menu has been released. This fix works by checking for a white pixel at screen location 159,1, which is at the top right of the title bar. A white pixel indicates the menu has been opened. (My screen width is 160, so if yours is different you must change the pget below.) This code only works, however, if your current form is a custom modal form.

  if b=16777215 a=1003	‘16777215=$FFFFFF=white
For non-modal forms, like IziBasic’s form 0, it is a little more complicated. First, you must set an inconspicuous pixel to a non-menu color, then check for that color. If the color has changed, the menu has been ticked. In the code below, I enable menu detection by setting pixel 0,15 (top, left, just below the title bar) to black (color 0). Then proceed with _DoEvents in a similar fashion.
  color 0
  pset 0,15

  if b<>0 a=1003	‘0=black,if pixel not black menu opened
(Submitted by JoeV)
  pages read