Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:36 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MM Dim Data BUG?

Author Message
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 08:51pm 04 Mar 2013
Copy link to clipboard 
Print this post

Hello everyone. I've been reading The Back Shed for quite a while but it's the first time I've posted.

Running an original Maximite with MMBasic 4.3. Just started working with DIM and DATA and have some strange results.

Original Test Program:

100 DIM A$(100)
110 FOR N=1 to 100: READ A$(N): NEXT
120 '
130 INPUT X
140 PRINT A$(X)
150 GOTO 130
160 '
700 DATA -,E,T,I,A,N,M,S,U,R,W,D,K,G,O,H,V,F,-,L,-,P,J,B,X
710 DATA C,Y,Q,Z,-,-,5,4,-,3,-,-,-,2,-,-,-,-,-,-,-,1,6,-,"/"
720 DATA -,-,-,-,-,7,-,-,-,8,-,9,0,-,-,-,-,-,-,-,-,-,-,-,-
730 DATA ?,-,-,-,-,-,-,-,-,.,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-

Gives the message "No data to read" at line 110; so after a sophisticated analytical approach (actually stuffing around) I changed the DATA to:

680 DATA -
700 DATA E,T,I,A,N,M,S,U,R,W,D,K,G,O,H,V,F,-,L,-,P,J,B,X,C
710 DATA Y,Q,Z,-,-,5,4,-,3,-,-,-,2,-,-,-,-,-,-,-,1,6,-,"/",-
720 DATA -,-,-,-,7,-,-,-,8,-,9,0,-,-,-,-,-,-,-,-,-,-,-,-,?
730 DATA -,-,-,-,-,-,-,-,.,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-

and IT WORKED, well once!

So again after further analytical approaches I came up something that worked again; I changed line 680 to:

680 DATA -,

and it worked Twice.

Then presented me with the message:
"An internal error was trapped and your program has been lost (sorry)"

(Biggles smiled grimly - CAPT W.E. Johns)

I have been using the built-in editor "EDIT"; and also directly entering this program typing... thinking there may be an issue with the editor.

Incidently pressing F1 in the EDITor does NOT SAVE my program. I have to exit the Editor and use 'SAVE' at the prompt...as I found out... sigh...

Any assistance appreciated.
Many Thanks, Nic.

PS I am a 60yo living on a remote cattle property in Western Victoria - I don't get out much
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 09:41pm 04 Mar 2013
Copy link to clipboard 
Print this post

I've just tried your code on a CMM, and it seems to work just fine...

No errors to report, no system crash message.

This is what I get on the screen:


? 5
A
?

?

? 6
N
? 1

? 9
U
? 8
S
? 0

?_


I have a B/W MM, so could try it on that - yours is NOT the colour MM, correct?

EDIT: 680 DATA -, DOES crash the CMM. I missed that line during the copy-and-paste of the program listing. I get the same message about an internal error and program being lost.

So, YES - I think you have found a bug.
Congratulations.

EDIT: Only seems to crash the MM if you press [F2] to run the code from within the editor utility. If I run the code after first exiting the editor with an [F1], it does not seem to worry the MM at all and runs fine.Edited by Grogster 2013-03-06
Smoke makes things work. When the smoke gets out, it stops!
 
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 10:03pm 04 Mar 2013
Copy link to clipboard 
Print this post

Hi Grogster, thanks for your comments.
Yes mine is B/W MM
Um see how you go with my next DIM 'glitch' :-)
Cheers, Nic.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 10:17pm 04 Mar 2013
Copy link to clipboard 
Print this post

Just a prod for you Nixie - recheck my original post - I have been able to recreate your original issue, so I think we do have a bug here...
Smoke makes things work. When the smoke gets out, it stops!
 
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 10:48pm 04 Mar 2013
Copy link to clipboard 
Print this post

No worries, yes saw that thanks. No I was referring to another post With an issue with DIM and the letter S.
Hmmm
 
MM_Wombat
Senior Member

Joined: 12/12/2011
Location: Australia
Posts: 139
Posted: 12:21am 05 Mar 2013
Copy link to clipboard 
Print this post

Hi,

You wrote:
  Quote  Incidently pressing F1 in the EDITor does NOT SAVE my program. I have to exit the Editor and use 'SAVE' at the prompt...as I found out... sigh...


If , from the prompt, you typed edit "myprog.bas"

then edit the program, then pressed F1, the file would be saved for you, but if you follow with an edit by itself then the editor would be empty..

edit by itself edits the program Loaded into memory. Edit filename, loads the editor with the file and saves it when F1 is pressed. Handy if you want to check something in another program, without affecting the one in program memory..

Dennis
Keep plugging away, it is fun learning
But can be expensive (if you keep blowing things up).

Maximite, ColourMaximite, MM+
 
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 12:42am 05 Mar 2013
Copy link to clipboard 
Print this post

DHANG! Thanks again Dennis. I don't recall having read that anywhere. Must add it to my MM Notes.
Makes perfect sense though.
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 12:53am 05 Mar 2013
Copy link to clipboard 
Print this post

  Nixie said   I don't recall having read that anywhere.


Nicholas, It is on page 5 of the current MMBasic manual.

  Quote   The full screen editor is invoked with the EDIT command. If you just type EDIT without anything else the editor will automatically start editing whatever is in program memory. If program memory is empty you will be presented with an empty screen.
.
.
.
You can also run the editor with a file name (eg, EDIT "file.ext") and the editor will edit that file while leaving program memory untouched. This is handy for examining or changing files on the disk without disturbing your program.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 01:58am 05 Mar 2013
Copy link to clipboard 
Print this post

Thanks Nixie, you have uncovered a number of bugs in the DATA command that escaped my testing. It shows how rarely it is used as some have been present from the early days

One issue was caused by your use of the minus symbol (-) in a data statement without quotes around it. The interpreter saw the minus and treated it the same as the minus in an expression (ie, A = 5 - 2) and got confused (it should have thrown an error instead). You must use quotes unless your string is an ordinary series of characters that cannot be misunderstood.

Unfortunately the handling of quoted strings also has a bug which might have accounted for why your program ran OK the first time then failed on the second run.

  Nixie said   Then presented me with the message:
"An internal error was trapped and your program has been lost (sorry)"

This is bad and I apologise. It was caused by the line: 680 DATA -,

The comma should go between data items and not be hanging off the end. Needless to say the interpreter should have caught that error and not crashed. It is not good loosing your program and I try especially hard to eradicate anything that can cause someone's hard work to be lost.

Because of the seriousness of the last issue I will release version 4.3A in the next week or two with the appropriate fixes (plus a few other goodies).

Geoff

Geoff Graham - http://geoffg.net
 
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 02:57am 05 Mar 2013
Copy link to clipboard 
Print this post

Geoff, I appreciate your comments. I'm glad the error came to light!

No worries, I understand completely from your 'side of the fence'. I'm very grateful to you for your efforts and enthusiasm! I'm just a bit rusty on programming in BASIC, it's a far cry from my first home built "PC" a DREAM 6800 with haxadecimal programming 1979?. I do a lot of electronics/ham radio and have some interesting projects which will come to light over the next few months - I hope.
I have a morse code beacon tracker program - for propagation evaluation; and a solar dish tracking program.... Then there's the greenhouse.

Thanks again Nic C
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6099
Posted: 10:29am 05 Mar 2013
Copy link to clipboard 
Print this post

  Nixie said   Hello everyone.

PS I am a 60yo living on a remote cattle property in Western Victoria - I don't get out much


There is absolutely nothing wrong with being a 60yo living in the bush!

(or with being a ham operator, the two go well together)

Jim VK7JH
VK7JH
MMedit   MMBasic Help
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 10:51am 05 Mar 2013
Copy link to clipboard 
Print this post

I agree ,58years young living in Clifton, Qld
Home of the famous "Dad & Dave" stories of Steele Rudd aka Arthur Hoey Davis.
Stories that defined the Aussie Battler ethos.Edited by djuqa 2013-03-06
VK4MU MicroController Units

 
BobDevries

Senior Member

Joined: 08/06/2011
Location: Australia
Posts: 266
Posted: 11:48am 05 Mar 2013
Copy link to clipboard 
Print this post

And I'm another; almost 60 now, living in Dalby, QLD with my wife and 7-year old son. Not *exactly* rural, but just a small town on the Darling Downs.

Regards,

Bob Devries
Dalby, QLD, Australia
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 12:13pm 05 Mar 2013
Copy link to clipboard 
Print this post

Looks like it's time for true confessions. I'm 69 and living in Yarrawonga VIC. It's certainly rural (about 300km from Melbourne) but Yarrawonga is no longer a small town with a population of about 6.5k and Mulwala (in NSW just across the big river) about another 2k.

Used to be able to leave the car on the driveway overnight with the windows down but not anymore. The rugrats have turned feral. Many people in town don't have keys for their doors. One place I know doesn't have a back door at all. He used to have a grog fridge under the carport but too many people helped themselves.
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 02:20pm 05 Mar 2013
Copy link to clipboard 
Print this post

Well I'm 64 and in the outer NE Melbourne 'burbs. I'd love to go somewhere "off-grid" but I'm afraid my wife is not quite so excited by the prospect. Mind you I'd probably miss the availability of everything here. We're seriously thinking of moving back 'home' to Tasmania (L'ton) again though, for the better lifestyle and climate along with old friends and family - one problem though, the kids/grandkids are in Sydney now.

Greg
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 08:53pm 05 Mar 2013
Copy link to clipboard 
Print this post

I love you blokes....

I feel so young at 54...


Well I don't really feel young especially when I cant find my glasses (that are probably on top of my head).

I think we are seeing why the MM is not appealing so much to students, but is sure appeals to us oldies. A bit like a Blokes Shed group


Regards,

Mick





Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
shoebuckle
Senior Member

Joined: 21/01/2012
Location: Australia
Posts: 189
Posted: 09:08pm 05 Mar 2013
Copy link to clipboard 
Print this post

You want somewhere where there are no locks on anything? Try Lord Howe Island. You won't regret it.
Hugh
 
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 09:12pm 05 Mar 2013
Copy link to clipboard 
Print this post

Gentlemen! I am delighted to meet you! My background is in farming, academia and in the military. Today I gave my stepson a MM. He's currently finishing off a thesis on nano particles; and has an application for the MM in automating a special calorimeter. Great stuff! Don't think it will be too long before we look for a retreat in Tassie (which we both love!) then settle down to "retirement"...for those of you who listen, or are licenced radio amateurs...if you want to put a voice to the name, I am usually on the Ballarat Amateur Radio Group net on Thursday evenings 3608khz at 8pm, or sooner.
Call sign VK3COW - er well um I am on a cattle property Best regards, Nic C
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024