Powerbasic Museum 2020-B

IT-Consultant: Charles Pegge => OxygenBasic => Topic started by: James C. Fuller on May 10, 2018, 05:26:10 PM

Title: May 10 progress issue
Post by: James C. Fuller on May 10, 2018, 05:26:10 PM
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



Title: Re: May 10 progress issue
Post by: Charles Pegge on May 10, 2018, 06:34:10 PM
Sorry James,

it was the new inkey() function in console.inc

I must remember to test with #autodim disabled!
Title: Re: May 10 progress issue
Post by: James C. Fuller on May 10, 2018, 07:03:05 PM
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

Title: Re: May 10 progress issue
Post by: Charles Pegge on May 10, 2018, 07:42:00 PM
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?

Title: Re: May 10 progress issue
Post by: Chris Chancellor on May 10, 2018, 08:01:35 PM
#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)


Title: Re: May 10 progress issue
Post by: Mike Lobanovsky on May 10, 2018, 09:56:19 PM
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.
Title: Re: May 10 progress issue
Post by: Charles Pegge on May 12, 2018, 04:29:40 AM
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.

Title: Re: May 10 progress issue
Post by: Charles Pegge on May 20, 2018, 12:08:09 PM
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.
Title: Re: May 10 progress issue
Post by: James C. Fuller on May 20, 2018, 02:56:33 PM
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
Title: Re: May 10 progress issue
Post by: Chris Chancellor on May 20, 2018, 04:11:54 PM
Thanxx a lot Charles

I can't wait for the Beta version of O2.  this will herald the new beginning for O2
Title: Re: May 10 progress issue
Post by: Chris Chancellor on May 21, 2018, 01:12:00 AM
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?
Title: Re: May 10 progress issue
Post by: Mike Lobanovsky on May 21, 2018, 04:03:57 PM
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?
Title: Re: May 10 progress issue
Post by: Charles Pegge on May 21, 2018, 07:16:31 PM
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.
Title: Re: May 10 progress issue
Post by: Chris Chancellor on May 21, 2018, 07:49:00 PM
Thanxx a lot Charles

now it is clean
Title: Re: May 10 progress issue
Post by: Mike Lobanovsky on May 22, 2018, 04:01:44 PM
But was it dirty at all in the first place?