Jump to content
Developer Wiki and Function Reference Links ×

Structure of If Statement


Recommended Posts

Hey all,

Just wondering if someone could give me a breakdown of the usage of the IF command in vectorscript.

I am trying to do something like this:

If x=y Then

a:=1;

b:=2;

Else

c:=1;

a:=4;

Just as an example could someone show me correct layout and syntax? I've been playing and searching but IF isn't the best keyword for searching.

Cheers,

James

Link to comment
  • Vectorworks, Inc Employee

The corect syntax would be:

If (x=y) Then
 Begin
 a:=1;
 b:=2;
 End {<- Note NO ;}
Else
 Begin
 c:=1;
 a:=4;
 End;

To get started take a look in the Help for the VS Language Guide, it will give you some basic examples.

Edited by klinzey
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...