Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: quanta.convertfreq - Function Up: quanta - Tool Previous: quanta.getformat - Function


quanta.form.xxx - Function



Package general
Module quanta
Tool quanta


Format a quantity using globaly set formats


Synopsis
form.xxx(v, showform)


Arguments

v in value to be converted
    Allowed: quantity
showform in show square brackets and separating , (not for all)
    Allowed: bool
    Default: F


Returns
string
If a multi-dimensional value is given for the value v in the case of dtime, long or lat, the returned value is a string vector of a length equal to last dimension. Each string has a number of fields equal to the number of elements in all earlier dimensions. If the showform is T, each vector element is surrounded by a pair of square brackets if there is more than one entry, and fields are separated by a ','.


Description
form.xxx (xxx can be lat, long, len, vel, freq, dtime, unit) will format the input into a string using the global format information set by setformat().



Example
- dq.setformat('freq','cm')
T 
- dq.form.freq(dq.quantity('5GHz'))
5.99584916 cm





next up previous contents index
Next: quanta.convertfreq - Function Up: quanta - Tool Previous: quanta.getformat - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01