| View previous topic :: View next topic |
| Author |
Message |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Wed Apr 22, 2009 9:55 pm Post subject: Break a line off code into multiple lines? |
|
|
I thought there was a way to break a single line of code down into another line in VDS, but can't remember or find any reference to doing such.
Does anyone know?
Thanks,
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Thu Apr 23, 2009 9:16 am Post subject: |
|
|
Not sure what you're asking
Do you mean 'word wrap' in the General Options under 'Options > Editor > Options' ?
Or do you mean: | Code: | %a = long page-wide string of parameters
%a = %a 2nd page-wide string of parameters
command %a |
_________________ cheers
Dave |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Apr 23, 2009 1:41 pm Post subject: |
|
|
Gee Garrett,
That has not been possible since version 3 something However it would be nice. I never understood why they took that out??? IMHO I think the word wrap option in the editor sucks makes it hard to read the code and does not wrap the code logically. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Apr 23, 2009 4:39 pm Post subject: |
|
|
Yeah, not the wordwrap, but being able to slice the line of code at your discretion and bring it down to the next line.
Like:
IF @greater(%%Top,@sum(%%aBot,5))@less(%%Top,//
@fsub(%%aTop,5))@greater(%%Lft,@sum(%%aRgt,5))//
@less(%%Lft,@fsub(%%aLft,5))
something like that is what I was thinking we could do. But I guess as DragonSphere points out, that's been taken out of VDS for some reason.
Oh well.
Thanks anyways,
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Thu Apr 23, 2009 5:21 pm Post subject: |
|
|
Its probably because the compiler would have a hard time figuring out where the logic in the code and the next line begins.
In many languages the end of a code block uses the ; character to signify ending that 'line' and begin a new one. VDS doesn't use anything to end a line other than to start a new line of code. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Apr 23, 2009 7:08 pm Post subject: |
|
|
Well I thought they did that so the @error() function would show the line that actually had the error in it? Anyway VisualBasic does not use anything to delimit it's lines and yet it allows you to break code across multiple lines I just think they did it so it would be easier for the interpreter to handle the code. I think a pre-compiler would be able to do this. It would make a really nice VDS addon tool. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Sat Apr 25, 2009 4:12 pm Post subject: |
|
|
I'm really not sure, I was just throwing out my best guess  |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sun Apr 26, 2009 1:04 am Post subject: |
|
|
Actually the only command you could break into multiple lines was the Dialog command. I don't think it was possible to do that with other commands and functions. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Sun Apr 26, 2009 1:14 am Post subject: |
|
|
From VDS 2 you mean? I think that used a ) to end the dialog create block? It's been so long since I've used vds  |
|
| Back to top |
|
 |
|