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.

DarkBASIC Professional Discussion / Anyway to break up long lines of code, like in VB?

Author
Message
The Weeping Corpse
14
Years of Service
User Offline
Joined: 19th Sep 2011
Location: United Kingdom
Posted: 28th Oct 2012 23:21 Edited at: 28th Oct 2012 23:22
In Visual Basic the "_" character can be used to break long lines of code into a much more readable format

e.g.

in Dark Basic Pro



and in VB could be structured as



Any workarounds for Dark Basic Pro?

The Weeping Corpse
14
Years of Service
User Offline
Joined: 19th Sep 2011
Location: United Kingdom
Posted: 28th Oct 2012 23:47
Nevermind, go into tools->options->text editor

and tick

Allow line concatenation using the '_' symbol.

Why this isn't ticked by default is anyone's guess.

Mod, please delete this thread.

The Weeping Corpse
14
Years of Service
User Offline
Joined: 19th Sep 2011
Location: United Kingdom
Posted: 28th Oct 2012 23:54
except it doesn't work correctly as the closing brackets of the function call are now always highlighted in red.



Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 29th Oct 2012 01:05


Unless PortalPolygon isn't just a vector then this can be altered slightly. You could refine it even more and make a passing variable that's used to setup the function.



objectLine3d will be used inside the function. This is usually what I do with my maths classes.

Login to post a reply

Server time is: 2026-07-11 14:52:59
Your offset time is: 2026-07-11 14:52:59