Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:35 26 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 : FileManager Program

     Page 2 of 2    
Author Message
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 01:14am 30 Jul 2012
Copy link to clipboard 
Print this post

Geoff,

"the workaround will be to avoid an assignment in the ELSE portion of a single line IF statement."

Just to clarify, the problem (in this case) is not in the ELSE portion.

It is when there is a GoTo Label or GoSub label in the THEN portion with a following ELSE.

Look forward to 4.0

Cheers,
Anthony.

 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 02:59am 30 Jul 2012
Copy link to clipboard 
Print this post

  ajkw said   Geoff,
Just to clarify, the problem (in this case) is not in the ELSE portion.
It is when there is a GoTo Label or GoSub label in the THEN portion with a following ELSE.
Anthony.


I'm on V3.2C as well and had the same problem a couple of weeks ago with an IF... GoSub and Else line. I assumed it was my crappy programming skills! I also fixed it by getting rid of the one-line IF and going with the multi-line one.

Greg
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 01:53am 31 Jul 2012
Copy link to clipboard 
Print this post

  ajkw said  
Just to clarify, the problem (in this case) is not in the ELSE portion.
It is when there is a GoTo Label or GoSub label in the THEN portion with a following ELSE.
Anthony.

For V3.2C users - I fixed the WAIT1, WAIT2 & WAIT3 as per above suggestions. There are two more statements to be fixed though in CHGDIR: and CHA: as shown below (the problem lines start with ***).


CHGDIR:
If vp=2 Then GoTo CHA

If Ldir$(2,tag)="" Then error=1:GoSub COMERR:GoTo LCURSOR
If Ldir$(1,tag)<>"*D" Then tag=tag+1:GoTo CHGDIR
***If Ldir$(2,tag)=".." Then GoSub CHC Else Lpath$=Lpath$+Ldir$(2,tag)+"\"
Chdir Lpath$:GoSub LUPDATE:cl=1:GoTo LCURSOR

CHC:
Lpath$=Left$(Lpath$,Len(Lpath$)-1)
If Right$(Lpath$,1)<>"\" Then GoTo CHC
Return

CHA:
If Rdir$(2,tag)="" Then error=1:GoSub COMERR:GoTo RCURSOR
If Rdir$(1,tag)<>"*D" Then tag=tag+1:GoTo CHGDIR
***If Rdir$(2,tag)=".." Then GoSub CHD Else Rpath$=Rpath$+Rdir$(2,tag)+"\"
Chdir Rpath$:GoSub RUPDATE:cr=1:GoTo RCURSOR


As Anthony said:
"the bug only seems to occur when an: IF - THEN - GOSUB (or GOTO) - ELSE sequence tries to execute"

Greg Edited by paceman 2012-08-01
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 09:56am 31 Jul 2012
Copy link to clipboard 
Print this post

Thanks paceman.

Version 4.0 is just around the corner. Everyone who at least has 3.2C should upgrade to it when it's available. I've no problems with 4.0 beta 9 on my original Maximite.

Nick
 
     Page 2 of 2    
Print this page


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

© JAQ Software 2024