next up previous contents index
Next: .if, .elif, .else, and Up: .param Line Previous: Subcircuit Parameters   Contents   Index

Pre-Defined Parameters

The following parameter definitions are always automatically defined, as if specified on a .param line. However, they are read-only, and attempts to redefine them will silently fail.

WRSPICE_BATCH
This parameter is set to 1 if WRspice is running in batch mode, 0 otherwise.

WRSPICE_PROGRAM
The value of this parameter is set to 1. This enables users to include WRspice-specific input in SPICE files, which will be ignored by other simulators (and vice-versa). The following lines will accomplish this:

.param WRSPICE_PROGRAM=0
.if WRSPICE_PROGRAM=1
(input lines specific for WRspice)
.else
(input lines specific to another simulator)
.endif

The first (.param) line would be silently ignored in WRspice, so that the ``(input lines specific for WRspice)'' will be read. In another simulator, the parameter definition will set WRSPICE_PROGRAM to zero, so that the ``(input lines specific to another simulator)'' would be read instead.

WRSPICE_RELEASE
The parameter WRSPICE_RELEASE is predefined with the release code number. The release code number is a five digit integer xyzz0, corresponding to release x.y.z. The x and y fields are one digit, z is two digits, 0 padded. The trailing 0 is a historical anachronism. For example, release 3.1.15 has release code number 32150. This parameter is read-only, and attempts to change its value in a .param line or otherwise are silently ignored.


next up previous contents index
Next: .if, .elif, .else, and Up: .param Line Previous: Subcircuit Parameters   Contents   Index
Stephen R. Whiteley 2024-10-26