Jump to content
Macro Express Forums

Equivalent of Basic's "GOTO"


balithag

Recommended Posts

Please pardon me if this subject has already been addressed elsewhere. For the record, I tried to search the forum, but the only terms I could think of to search on had four or fewer characters: GOTO, skip, jump

 

Is there a Macro Express 3 command that simulates the GOTO command in Basic, where you specify either by line number or by some other marker a place in the same macro to jump to if a certain condition is met? I'd like to avoid having it call an outside macro if possible.

Thanks in advance.

Link to comment
Share on other sites

Ah! An existential crisis! Is ME a keystroke capturer, or is it a programming language?

 

I hereby cast my vote for adding GOTO to ME. That, and some fancier date-time-manipulation commands, would be high on my wish list.

 

I agree with 100% committance!

 

A Marker and GOTO command would be fabulous.

 

I'm not sure if you know this but ME's date/time manipulation is already pretty good (although not great), check out the "date" and "date/time" commands under the "Text" catagory

Link to comment
Share on other sites

Please pardon me if this subject has already been addressed elsewhere. For the record, I tried to search the forum, but the only terms I could think of to search on had four or fewer characters: GOTO, skip, jump

 

Is there a Macro Express 3 command that simulates the GOTO command in Basic, where you specify either by line number or by some other marker a place in the same macro to jump to if a certain condition is met? I'd like to avoid having it call an outside macro if possible.

Thanks in advance.

 

This is my approach ...

Switch (N1)
 Case: 0
   Macro Run: MAC0
 End Case
 Case: 1
   Macro Run: MAC1
 End Case
End Switch

etc.

 

With a "Macro Return" in each call to an external macro above the code will continue after the "End Switch" statement. Not quite the functionality of a GOTO but usable.

Link to comment
Share on other sites

Ah! An existential crisis! Is ME a keystroke capturer, or is it a programming language?

 

I hereby cast my vote for adding GOTO to ME. That, and some fancier date-time-manipulation commands, would be high on my wish list.

 

Throw my vote into the hat... GOTO and markers. Seems silly not to have these if Loop functionality is already present.

Link to comment
Share on other sites

  • 4 weeks later...

I used to think GOTO would be an improvement but now I think it's a crutch. The logic of ME just works differently than BASIC. Once you get your head around it there's nothing you can't do without it and often I think it disciplines my thinking to more efficient and logical code writing. Having said that I did write a sleazy way of doing GOTO in ME3. Click here to see it on my webpage.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...