Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:41 25 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 : re MM Basic

Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 10:09pm 07 Jan 2012
Copy link to clipboard 
Print this post

I tried just writing a simple for next loop without line nos. and it gives me error message 'for without next' and 'next without for'. as soon as I add the line nos. everything is OK.
I line numbered my complete program and it runs OK but remove the line nos. and use labels and it won't work.
I'm sure I am writing it OK as I have written many programs for the PICAXE.
Maybe I will try downloading and installing V.3 again incase it has an error.

Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 10:12pm 07 Jan 2012
Copy link to clipboard 
Print this post

Show us the Code version without line numbers please.

VK4MU MicroController Units

 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 10:26pm 07 Jan 2012
Copy link to clipboard 
Print this post

I think I know the problem.

In version 3, when entering new code without line numbers, you must be in EDIT mode. That tells MMBasic you are editing a program, otherwise it will try to run each line as you enter it. Just type EDIT to start the editor.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 10:49pm 07 Jan 2012
Copy link to clipboard 
Print this post

I'm sure your right Gizmo.

With 3.0 you either write the old fashion way with line numbers
or
type EDIT first and then work from within the built in editor.

It's two styles of retro computer in one.
www.elproducts.com
 
jebz

Regular Member

Joined: 13/06/2011
Location: Australia
Posts: 79
Posted: 11:27pm 07 Jan 2012
Copy link to clipboard 
Print this post

  palcal said   I tried just writing a simple for next loop without line nos. and it gives me error message 'for without next' and 'next without for'. as soon as I add the line nos. everything is OK.


There is a bug that may be producing the problem you're encountering -

If you have an odd number of blank lines before a NEXT, ENDIF, DATA, WHILE or WEND statement you will get an error message. MM Bug list

 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 12:26am 08 Jan 2012
Copy link to clipboard 
Print this post

OK I wasn't in EDIT mode, I will go and try that.
Thanks All
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Print this page


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

© JAQ Software 2024