Auxiliary Programs — EnergyPlus 23.1

<< Prev | Table of Contents | Next >>

Macro Debugging and Listing Control[LINK]

##list

Turn on listing; echo of input lines on the OUTPUT file is enabled. This is the default condition.

##nolist

Turn off listing; echo of input lines on the output file is disabled.

##show

Start printing expanded line on output file. After this command, if a macro expansion was done, the expanded line is printed on the output file. In this way you can see the end result of macro expansions, which is the input as seen by the EnergyPlus Input processor.

##noshow

Stop printing expanded line on output file. This is the default condition.

##showdetail

Start printing each macro expansion. After this command, every time a macro expansion is done the result of the expansion is printed. This can produce lots of output.

##noshowdetail

Stop printing each macro expansion. This is the default condition.

##expandcomment

Comment fields may contain macro expansion directions. Following this command, the macros will be expanded in comments.

For example, you might have:

##set1 Location = “Colorado Springs, CO”

! Simulation run for Location[]

If ##expandcomment preceded the set1 command, then the output would look like:

! Simulation run for Colorado Springs, CO

##noexpandcomment

This does not expand macros in comment fields. This is the default condition.

##traceback

Give full traceback when printing an error message. After this command, if there is a EP-MACRO error, a full traceback of the macro expansions in progress is printed. This is the default condition.

##notraceback

Don’t give full traceback when printing an error message.

##write

Start writing expanded text into file 22. This is similar to ##show except that the expanded lines are written into file 22. Therefore, file 22 will contain only the text that will be seen by the EnergyPlus processor. This file is used only for debugging purposes. It allows you to see what the macro-processed input file looks like.

##nowrite

Stop writing expanded text into file 22. This is the default condition.

##symboltable

Prints table of current macro names. All of the macro names that are defined will be printed.

##clear

Clear all macro definitions. All the macro names defined up to this point will be deleted.

##reserve TEXT k NAMES l STACK m

Allocates memory.

Reserves k words of space in AA array for macro definition storage.

Reserves l positions in macro definition names table.

Reserves m words of stack space.

If used, the ##reserve command must precede all other macro commands in the EP-MACRO input. This command should be used only if one or more of the following error messages is received:

“Need more memory for storing macro definitions”

Use “##reserve TEXT nnnnnn” command to get more memory. Current value of nnnnnn is: _ _ _

“Macro table capacity exceeded”

Use “##reserve NAMES nnnnnn” command to get more memory. Current value of nnnnnn is: _ _ _

“Macro stack overflow”

Use “##reserve STACK nnnnnn” command to get more memory. Current value of nnnnnn is: _ _ _

##! <comment>

Allows you to enter comment lines inside a macro. <comment> is printed in the EP-MACRO echo but is not acted on by the macro processor.

Example:

This example shows the use of the ##set, ##include, ##eval and ##if commands. Let an external file called cities.idf contain the following text:

** ##if #*[ city[ ] EQS CHICAGO ]

Location,Chicago IL, !- Location Name

41.880, !- Latitude

-87.63, !- Longitude

-6.0, !- Time Zone

2.; !- Elevation {m}

##elseif #[ city[ ] EQS WASHINGTON ]

Location,Washington DC, !- Location Name

38.9, !- Latitude

-77.0, !- Longitude

-5.0, !- Time Zone

15.; !- Elevation {m}

##else

** ** ERROR — City Undefined

##endif

Then the EnergyPlus input

##set1 city[ ] CHICAGO

##include cities.idf

will be converted, after macro processing, to:

Location,Chicago IL, !- Location Name

41.880, !- Latitude

-87.63, !- Longitude

-6.0, !- Time Zone

2.; !- Elevation {m}