forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Break a line off code into multiple lines?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Apr 22, 2009 9:55 pm    Post subject: Break a line off code into multiple lines? Reply with quote

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
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Thu Apr 23, 2009 9:16 am    Post subject: Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Apr 23, 2009 1:41 pm    Post subject: Reply with quote

Gee Garrett,
That has not been possible since version 3 something Razz 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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Apr 23, 2009 4:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Thu Apr 23, 2009 5:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Apr 23, 2009 7:08 pm    Post subject: Reply with quote

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 Question 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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sat Apr 25, 2009 4:12 pm    Post subject: Reply with quote

I'm really not sure, I was just throwing out my best guess Smile
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sun Apr 26, 2009 1:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sun Apr 26, 2009 1:14 am    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group