The following characters have special meanings.
The tab character (ASCII character 9) is replaced by the space character
(ASCII character 32) wherever it occurs.
The question mark, when it appears at the end of a word, indicates that the
word is a query. (Queries are related to symbols.)
A numeric character appearing at the beginning of a word indicates that the
word is a number (except if the word ends with a question mark, in which case
it is a query).
The semicolon terminates an input. When prompting for a command or any other
input, the program continues to read until it encounters a semicolon or a
blank line. When reading a command from a procedure, the program continues to
read
until it reaches a semicolon or the end of the procedure.
When inputs are being entered from the keyboard, entry of a blank line cancels the current input. Hitting the Return key twice cancels entry of the command:
PERCY > LET RESULT = TEST1 INTERSECT [Return] [Return] PERCY>Hitting the Return key in response to a prompt is the same as responding with a blank string:
Percy> LET RESULT? = SCHEDULE1? * SCHEDULE2?; Enter value for RESULT > Enter value for SCHEDULE1 > test; Enter value for SCHEDULE2 > test2; -Oops!- I was expecting to see a word of letters and digits starting with a letter when I encountered the word "=" in the input string. LET ...=... test * test2Because the semicolon terminates an input, any characters following a semicolon on an input line are ignored.
Percy> LET RESULT? = SCHEDULE1? * SCHEDULE2?; Enter value for RESULT > test1; extra Enter value for SCHEDULE1 > test2; characters Enter value for SCHEDULE2 > test2; are ignored ;;;LET test1 = test2 * test3
Any words bracketed by the character `@' are protected from symbol
evaluation. Once symbol resolution has been acheived the `@' character is
removed from the command. This can be useful when you want to create a
procedure that may be called by someone who may have defined symbols that
conflict with the commands you want to use in your procedure. For example:
@find close separation of io jupiter from earth less than 1 arcsecond step size 1 hour @;
Any characters enclosed in double or single quotes are passed to the program
unchanged. (Characters are not stripped; symbols, and queries are not
evaluated.) However, unlike the `@' character, quotes are not removed from
the string before passing it on the the program. As such, quotes are useful
primarily for annotation of schedules.
Punctuation is not used in commands, except for the use of the semicolon for
the termination of inputs (described in the previous section), and the use of
delimiters in date and time inputs (described in the next section). A command
consists of a sequence of words, delimited by spaces.
The following are the types of words that may be encountered in a command.
Keywords are used by to the program determine the action to be taken in
response to a command. They may be up to 32 characters in length. Keywords
are recognized from context, and are not reserved words. Keywords may b in
upper, lower or mixed case. For example, the following are valid commands.
LET UNION = A UNION B; FIND SEPARATION separation OF MOON SUN FROM EARTH Less THAN 30 DEGREES WithIn MOON STEP SIZE 1 DAY;
Schedule names, report names, quantity names and symbols may be up to 32
characters in length. They must begin with a letter, may contain only
letters, digits, underscores, and hyphens, and may end with anything other
than a question mark.
A query may be up to 32 characters in length and must end with a question
mark.
File names may not contain imbedded blanks, tabs or the `@' character. Other
than these restrictions the only limits on file names are those imposed by
the operating system.
Numbers may be up to 32 characters in length. Any numeric representation
accepted by Fortran is accepted by the program, except that numbers may not
be interrupted by spaces. The following are all acceptable representations of
numbers:
-1 000003 +12.2E-1 -3.14159276 1D12 E -E-10In addition, the character string
PIis interpreted as the number
3.1415926535897932384626Where integers are required, floating point numbers that have non-integer values will not be accepted. Where floating point numbers are required, integers will be accepted.
Dates and times are entered as collections of words. (Grouping is indicated
by context.) They are discussed in detail in the following section.
Time may be entered in a variety of formats and time systems. The
``preferred'' method of time input used by PERCY is calendar date UTC.
However, you may also enter times as calendar date TDB, TDT or as the numeric
epochs of Julian Ephemeris Date or Julian Date UTC.
A valid calendar epoch consists of at a date specification and an optional
time of day.
The time of day should be specified as `xx:yy:zz.z...z' where `xx' stand for hours, `:yy' for minutes, and `:zz.z...z' for seconds and fractional portion of seconds. Seconds and minutes may be omitted from the time. Hours are always integers between 0 and 23; minutes are integers between 0 and 59; seconds are numbers from 0 upto (but not including) 61.
Examples of valid date and time formats are:
1/9/1986 3 12 59.22451 ( 1986 JAN 01 03:12:59.22451 ) 2 JAN 1991 3:00:12.2 ( 1991 JAN 02 03:00:12.2 ) 29 FEBRUARY 1975 3:00 ( 1975 MAR 01 03:00:00 ) 10 OCTOBER 2029 3:58 ( 2029 OCT 10 03:58:00 ) 1988-38/ 12:14 ( 1988 FEB 07 12:14:00 )
Calendar dates may be used for any of the time systems:
Terrestrial Dynamical Time (TDT), Barycentric Dynamical Time (TDB) or Coordinated Universal Time (UTC). You specify a time system by prefixing or suffixing the calander date with one of the three letter system abbreviations: TDT, TDB or UTC. You may enclose the system identifier in parentheses if you feel it adds more clarity, e.g. (TDT). If an epoch is entered as calendar date and time and no system identifier is included it is assumed that the epoch is a UTC epoch. A few examples illustrating the use of the system identifiers are:
(TDT) 1993 FEB 12 12:18:29.2 TDB 1994 MAR 28 13:11:28.18 1992 APR 27 11:18:28. UTC 1992 APR 27 11:18:28. (UTC)
Two forms of Julian Date are allowed as input Julian Ephemeris Date and
Julian Date UTC. The first is simply Julian Dates referenced
relative to the TDB time system. The second is Julian Date referenced to the UTC time system.
Julian Ephemeris Dates are specified by giving the numeric portion of the Julian Date prefixed or suffixed by the label JED. Julian Dates UTC are specified by supplying the numeric portion of the date together with the label JDUTC. Again, you may enclose the system label in parentheses if you feel it aids clarity.
With the exception of ID codes, numeric values, where required as inputs or
given as outputs, are assumed to be in the units and systems given below.
ARCMINUTES ARCSECONDS AU AUS CENTIMETERS CENTURIES CENTURY CM COULOMBS DAYS DEGREES DMS ELECTRON_CHARGES FEET FOOT GRAMS HMS HOURANGLES HOURS HRS INCH INCHES JULIANYEARS JULIAN_CENTURIES JULIAN_CENTURY JULIAN_YEARS JYEARS KGS KILOGRAMS KILOMETERS KM LIGHTDAYS LIGHTHOURS LIGHTMINUTES LIGHTSECONDS LIGHTYEAR LIGHTYEARS METERS MILES MILLIMETERS MINS MINUTEANGLES MINUTES MMS NAUTICALMILES NAUTICAL_MILES OUNCES PARSECS POUNDS RADIANS REVOLUTIONS REVS SECONDANGLES SECONDS SECS STATCOULOMBS STATUTEMILES STATUTE_MILES TROPICALYEARS TROPICAL_YEARS WEEKS YARDS YEARSWhenever one of these words appears in a command, all the numbers that immediately precede it are converted to the appropriate default units. For example, the commands
FIND CML CENTRAL MERIDIAN OF 501 FROM 399 BETWEEN 15 21 DEGREES;is equivalent to the command
FIND CML CENTRAL MERIDIAN OF 501 FROM 399 BETWEEN 54000 75600;but much easier to enter. The body numbers 501 and 399 are not converted because the conversion stops at the keyword BETWEEN.
Derived quantities may be constructed by using multiplication (*), division (/), and exponentiation (**). The derived units must form a single word (sequence of non-blank characters). A few examples are illustrated below.
KM/SEC**2 (1.E-4*AU/(40*DAYS)**2) RADIANS/WEEKS