DreamBerd icon indicating copy to clipboard operation
DreamBerd copied to clipboard

goto statement

Open steveruizok opened this issue 2 years ago • 5 comments

I'd like a goto statement that accepts a string or other code.

const var keys = {}!
addEventListener("keydown", e => keys[e.key] = true)!
addEventListener("keyup", e => keys[e.key] = false)!

function isKeyDown(key) => {
   if (keys[key] = undefined) {
       goto(const var keys = {}!)
   }
}

steveruizok avatar Jun 06 '23 16:06 steveruizok

similarly, adding COMEFROM is also of utmost importance.

gilice avatar Jun 06 '23 19:06 gilice

similarly, adding COMEFROM is also of utmost importance.

Nice good job you totally beat me to it...

PThorpe92 avatar Jun 06 '23 21:06 PThorpe92

similarly, adding COMEFROM is also of utmost importance.

Make sure you have COMEFROM and RETURNTO. Also, make them async.

Ygg01 avatar Jun 06 '23 23:06 Ygg01

sounds good, wanna submit a PR @steveruizok?

TodePond avatar Jun 07 '23 08:06 TodePond

May as well add GOTOANY as well. Can't even count how many times that woulda made life easier.

jhargis avatar Jun 21 '23 22:06 jhargis

In addition to the much needed named states for COMEFROM, remember that for a full and proper control flow Cobol had the GOBACK statement

F2nbr2UXkAAmXiW

rusinsky avatar Aug 07 '23 11:08 rusinsky

Make sure you have COMEFROM and RETURNTO. Also, make them async.

RETURNTO? or RETURNFROM? I think return should be in client code, not in func

metalim avatar Aug 07 '23 18:08 metalim