• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

May 10 progress issue

Started by James C. Fuller, May 10, 2018, 05:26:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

James C. Fuller

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




Charles Pegge

Sorry James,

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

I must remember to test with #autodim disabled!

James C. Fuller

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


Charles Pegge

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?


Chris Chancellor

#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



Mike Lobanovsky

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.
Mike
(3.6GHz Intel Core i5 w/ 16GB RAM, 2 x GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

Charles Pegge

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.


Charles Pegge

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.

James C. Fuller

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

Chris Chancellor

Thanxx a lot Charles

I can't wait for the Beta version of O2.  this will herald the new beginning for O2

Chris Chancellor

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?

Mike Lobanovsky

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?
Mike
(3.6GHz Intel Core i5 w/ 16GB RAM, 2 x GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

Charles Pegge

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.

Chris Chancellor

Thanxx a lot Charles

now it is clean

Mike Lobanovsky

But was it dirty at all in the first place?
Mike
(3.6GHz Intel Core i5 w/ 16GB RAM, 2 x GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)