Scion Macros How to make macros for Scion

  • Slides: 13
Download presentation
Scion Macros How to make macros for Scion The Fast and Easy Guide

Scion Macros How to make macros for Scion The Fast and Easy Guide

What is a Macro? A macro is a series of commands and instructions that

What is a Macro? A macro is a series of commands and instructions that you group together as a single command to accomplish a task automatically.

Macros Purpose Macros in image processing allows for • Automation • Technique Enhancements.

Macros Purpose Macros in image processing allows for • Automation • Technique Enhancements.

Scion Macro • Utilize the pascal language • Are written in text format •

Scion Macro • Utilize the pascal language • Are written in text format • Use pre-defined function • Help files are extensive and thorough

Pascal • Scion help information assumes that you already know Pascal • It has

Pascal • Scion help information assumes that you already know Pascal • It has an extensive library of functions, which I have compile into one text document (“Scion Function. doc”). • I have compiled together a few of syntax for Pascal (“Scion Pascal. doc”)

Pascal Ground Rules • All command ends with semi-colon • Assign value to variable

Pascal Ground Rules • All command ends with semi-colon • Assign value to variable with colon followed by equal sign (i. e. variable: =2; ) • Comments are put into brackets { } • Strings are defined with ‘ ‘

Macro Structure macro ‘macro name’; var {declaring global variables} i, pid 1, pid 2:

Macro Structure macro ‘macro name’; var {declaring global variables} i, pid 1, pid 2: integer; a, b, c: boolean; variable 1, variable 2: real; begin { your code here} end;

Loops FOR Loops PASCAL C/C++ for i: =1 to 8 do begin for(int i=0;

Loops FOR Loops PASCAL C/C++ for i: =1 to 8 do begin for(int i=0; i<8; i++){ { code here }; end; }

Loops WHILE Loops PASCAL C/C++ Repeat while( parameter ){ { code }; until parameter;

Loops WHILE Loops PASCAL C/C++ Repeat while( parameter ){ { code }; until parameter; { code }; }

Loops IF Statements PASCAL C/C++ if parameter then { code}; if( parameter ) {

Loops IF Statements PASCAL C/C++ if parameter then { code}; if( parameter ) { code }; if parameter then begin if (parameter){ { code }; end; } if parameter if( parameter) else

Neat Input/Output Tools • Get - can prompt user for input – Get. Number();

Neat Input/Output Tools • Get - can prompt user for input – Get. Number(); Get. String(); • Set - change option and setting – Set. New. Size(); Set. Threshold(); • Show – Show. Message(); Show. Histogram();

Macros vs. Procedure • Think of procedure as functions that could be called only

Macros vs. Procedure • Think of procedure as functions that could be called only the macros. • NOTE: variable declare in procedure or macro are availablet to call procedure.

Conclusion The best way to learn is to it yourself. I would recommend that

Conclusion The best way to learn is to it yourself. I would recommend that you first look at the basics to Pascal, then look at the example macros and used the function tables as references.