Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Tweek IDE for + and - maximize and minimize for gosubs??

Author
Message
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 13th Nov 2016 16:56
Is it possible to tweek the IDE for all _gosublinks/Return to use maximize and minimize [+][-] tabs

IDE uses minimize and maximize [+] and [-] Show/hide code tabs with do-loops and for-next statements: could this also work with gosub _GOSUBLINK/ RETURN please
I can see why it might difficult or annoying with for-next loops
_Gosublink/Return [+][-] should be rather simple??
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 13th Nov 2016 20:30
Gosub is nasty to begin with.... If you can and .... Of course you could i suggest converting that to a function.

A gosub cant return anything but a function can. Dimmed memory also passes though if you need to setup a scene of any sort.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 14th Nov 2016 07:32
you can fold code in agk v2 also with
foldstart
foldend
AGK (Steam) V2.0.21 : Windows 10 Pro 64 Bit : AMD (16.6) Radeon R7 265 : Mac mini OS Sierra (10.12)
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th Nov 2016 09:37 Edited at: 14th Nov 2016 09:39
Gosub does not denote the start of the routine, so cannot be used as the start of the function fold.

See the following example code as to why you cannot fold gosubs. (Personally, I believe they're almost as bad as GoTo's and you shouldn't use them. They're messy (if used incorrectly, which many new coders do) and introduce spaghetti code.)


Also, the IDE requires a fixed command in order to start a fold, (like foldstart) and since gosubs use user created labels, this is a problem. If you start interpreting all commands with a :, then it will affect usage of a colon to separate lines.

As mentioned above, don't use gosub, and start using functions.

Login to post a reply

Server time is: 2024-09-29 21:29:25
Your offset time is: 2024-09-29 21:29:25