Charles,
For most of my non-gui testing I use
use rtl64
#autodim off
use console
use corewin
This causes :
ERROR: Iteratator must be defined
WORD: i
LINE: 176
FILE: C:\OxygenBasic\inc\console.inc
PASS: 2
In a number of my tests
James
Sorry James,
it was the new inkey() function in console.inc
I must remember to test with #autodim disabled!
Charles,
I started using explicit dimensioning way back in my Atari 800XL days.
Without it I chased an error for days where I had used a zero instead of an "O" in a variable name. It was very hard to tell on the 40 column Commodore monitor (state of the art at the time) I was using.
James
We could change the default to #autodim disabled. It would not be a serious inconvenience, although it might throw some of the smaller demos.
Does anyone else have a opinion on autodim?
#autodim off
is quite useful bcos it tells us to be wary of variables that hasn't been dim yet
am i correct?
bcos in PB we use #DIM ALL
Using #DIM ALL requires you to declare all variables before they are used in a program. This option makes PowerBASIC behave a lot like languages like C++ and Pascal which require that all variables be declared before they can be used.
see http://www.manmrk.net/tutorials/basic/PowerBASIC/pbcc/_dim_metastatement.htm (http://www.manmrk.net/tutorials/basic/PowerBASIC/pbcc/_dim_metastatement.htm)
My vote is for #autodim off on default.
Autodim-ing casts a damper on the users and tends to keep them stuck at the beginner programmer level for unreasonably long. It is also a likely source of nasty programming bugs.
A sensible programmer should not delegate his responsibilities to the machine beyond reason.
Okay. I'm working through all the examples, to catch all the undimensioned variables. It's a lengthy but well overdue plod, and I can also remove extinct material at the same time.
After trawling through about 1300 files, the deed is done, and OxygenBasic now defaults to #autodim disabled
The full package is available on the github link below, as OxygenBasicProgress.zip.
Charles,
Good job!
Are we Beta yet? :)
Please add these to WinData.inc :
% CBM_FIRST 0x1700
% CB_SETMINVISIBLE (CBM_FIRST+1)
% CB_GETMINVISIBLE (CBM_FIRST+2)
% CB_SETCUEBANNER (CBM_FIRST+3)
% CB_GETCUEBANNER (CBM_FIRST+4)
I found CB_SETMINVISIBLE is needed (for win10 all compilers) to set the size of the drop down.
James
Thanxx a lot Charles
I can't wait for the Beta version of O2. this will herald the new beginning for O2
Hello Charles
after downloading OxygenBasicProgress.zip and then scanning it with Mcafee AV.
it found a virus called machine learning ! can you please check this on your side?
Exactly what compels you to run the OxygenBasic zips additionally through a virus scanner, Chris? Is it masochism or what? Why would you think the results on Charles' side might be different from yours? Why wouldn't you just put O2 on the AV exception list to avoid its false alarms?
It may be a small binary. I found a stray 't.exe' in one of the examples/opengl subfolders. I've now updated OxygenBasicProgress.zip without this file.
Thanxx a lot Charles
now it is clean
But was it dirty at all in the first place?