how to write pretty good macros in stratus

14
How to write pretty good Macros in Stratus a guide by www.srinimf.com

Upload: srinimf-techjobs-bizsuccess

Post on 11-Jan-2017

188 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: How to write pretty good macros in stratus

How to write pretty good Macros in Stratusa guide by www.srinimf.com

Page 2: How to write pretty good macros in stratus

Rules

You need to follow these rules to write good Macros

Page 3: How to write pretty good macros in stratus

Syntax

Macro.cmA command macro always has an extension like “.cm”

Page 4: How to write pretty good macros in stratus

How to run a macro

Testmacro -form

By typing above command, you will see options present in the macro.

Page 5: How to write pretty good macros in stratus

How macro run

A “macro processor” in the operating gets instructions. And, macro will be executed.

Page 6: How to write pretty good macros in stratus

What is a macro line

Any macro line can have either of these 3 values-Command line-Macro line-Input line

Page 7: How to write pretty good macros in stratus

What is command line

A command line is a combination of command strings and are separated by ‘;’

Page 8: How to write pretty good macros in stratus

How to write command macro

Ampersand (&) Keyword&begin_parameters

Page 9: How to write pretty good macros in stratus

Writing commentsFor example, the first two lines of the following macro are comment lines:

& This command macro is named set_cursor.cm.&

Page 10: How to write pretty good macros in stratus

ParameterA parameter in a command macro is a named variable that is declared within the parameter declaration section (defined below) of a command macro. A parameter receives its initial value in one of the following ways:

from an argument specified in the command string that calls the macrofrom a default value specified within the macro.

Page 11: How to write pretty good macros in stratus

Declare parameterFor example, the following parameter declaration section declares two parameters, source_module and output_file. Note that neither of these declarations has a parameter descriptor:

&begin_parameters source_module output_file&end_parameters

Page 12: How to write pretty good macros in stratus

Label

A label is an optional element of a parameter descriptor. Its purpose is to provide a descriptive term that will be useful to the user of a macro. It has the following form:

label:

Page 14: How to write pretty good macros in stratus

Final Point: Thank YouSubscribe towww.srinimf.com

TipWorld’s most popular website

www.srinimf.com