Jump to content
Developer Wiki and Function Reference Links ×

subroutines


Recommended Posts

They are called from within a VectorScript (VS) program. You can create a new VS with the Resource Browser. At the top of the display, there is a menu to the right of the word Resources. Under that menu there are more menus. Goto

New Resources in 'yourfilename' -> VectorScript...

If you don't have a VS Palette in your file yet, it will ask you to create one, otherwise it will ask you which palette to add the VS to. Then it will ask you to name the script. THEN, you will have a blank window in which to type or add your script - the VectorScript Editor.

A basic program shell with one subroutine in it looks like this:

code:

procedure SomeName;

procedure SubroutineName; { you can also have a parameter list, if needed }

Begin

{ subroutine code goes here }

End;

BEGIN

{ VS code here }

SubroutineName; { calls your subroutine }

{ more VS code here }

END;

Run(SomeName);
[/code]

I am reading a lot into your question. If I didn't answer what you were interested in, please be more specific.

HTH,

Raymond

Link to comment

You can have $INCLUDE files on your hard drive and reference them from a VS. I don't recommend using this method for everyday tools, from a stability point of view, but there are exceptions.

The tool(s) would require one or more files to be present for it to work. If you wanted to give a tool to someone else, he or she would have to install the tool and the $INCLUDE file(s) exactly as you did.

However, if you only use this method for development of your tools, it's not a bad way to go. At the end of development, you can encrypt your script and force the compiler to copy all referenced code to your tool, thus making it self contained. (Read about the .px filename extension.) One caveat about this, all code in the $INCLUDE file will be copied to your tool, even routines that are not used. If your $INCLUDE files are big, your tool will larger than needed.

HTH,

Raymond

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...