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 / IDE Concatenation... erm?

Author
Message
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 24th Apr 2003 04:22
oki i'm working through something right now which is doing my brain in... and i've been wondering in the IDE had something similar to namespacing?

it'd really help me right now to group things together with something similar ... and i saw in the options this Concatenation thing, which as the IDE itself has bugger all help - i'd like to know, what the heck it actually does?

could i use that for name spacing? i don't think i've ever heard that word before which is why it is confusing the hell out me of what i could possibly do - and it has the '_' which most guys i've seen tend to assign to gosub names ... but i dunno
Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 24th Apr 2003 06:44
Concatenation is basically a way to join two seperate lines together.
Say you had a command that was really long and you wanted it to fit on the screen instead of having to scroll over to see it. You would split that command up with the concatenation command like so:

Array insert at top ArrayName(0)

is equal to

Array insert a_
t top ArrayName(0)

or

Array insert at top Arr_
ayName(0)


These three are the same but the bottom two are more compact than the top one. Obviously you probably wouldn't need to concatenate this command too often but if you were using the set dir command or something that required a long string name you could concatenate to keep it all on the screen and therefore more easy to read.

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 24th Apr 2003 14:27
oh so you mean like when i put function inputs on seperate lines?



i kinda always figured that was actually what the ';' was for as you could carry on new lines but it'd start a new one, or start a new line and it'd act like the old line

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Apr 2003 15:46
You're thinking in C again.

End of command is ';' in C, but is the end of the line for DBPro, unless the last character is the underscore (or whatever your line concatenation character(s) is set to).

You would write your function like this:



The first two lines would be joined by the editor before being passde to the compiler.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 24th Apr 2003 16:48
i've seen the ';' used in so many ways in DB programming i actually don't have a clue what exactly it is to be used for. why when i want an end of line command thing i use ':' instead, cause i know what happens when i use that.

i would've thought that DBpro would have multiple line functions by now - i mean we've been able to use upto 255 inputs since v1 but as we only have 255 characters per line, we can't possibly use that many inputs

i'm not saying i would, but when you add into the equasion the 'as' data typing ... suddenly small lines become very very long even with small names - god i hope the new IDE sorts out alot of these niggles i have with DBpro

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?

Login to post a reply

Server time is: 2026-07-11 09:30:22
Your offset time is: 2026-07-11 09:30:22