Units[GetUnit] - 単位情報の抽出
使い方
GetUnit(unit, opt1, opt2, ...)
パラメータ
unit - 記号;単位名
opt1, opt2 ... - オプション名で、ここで opt1, opt2, ... は abbreviation または abbreviations、context、 conversion、 default、 plural、 prefix、 spelling、 spellings、 symbol、 symbols のどれかです;与えられた単位のオプションを指定します。
|
説明
|
|
•
|
関数 GetUnit(unit) は、デフォルトの単位名と、関数 AddUnit のオプションとして与えた場合に単位の再構成に使われるものだけについて、オプションに関する式の並びを返します。
|
•
|
関数 GetUnit(unit, opt1, opt2, ...) は、 opti の値を表している式の列を返す。ただし、opti はオプション名である。 これにより、GetUnit(unit) の出力に含まれない情報を表示することができる。 各オプションの詳細については、Units,AddUnit を参照すると良いでしょう。
|
•
|
関数 GetUnit(unit, context) は unit の指定省略時の意味を決める便利な手段です。
|
|
|
例
|
|
>
|
with(Units):
GetUnit(ounce[avoirdupois]);
|
![ounce, context = avoirdupois, default = false, conversion = (45359237/1600000)*gram[SI], prefix = false, symbol = oz, symbols = {oz}, spelling = ounce, plural = ounces, spellings = {ounce, ounces}, abbreviation = none, abbreviations = {}](/support/helpjp/helpview.aspx?si=1867/file00867/math90.png)
| (2.1) |
>
|
GetUnit(ounce[avoirdupois], default, symbols, symbol);
|
| (2.2) |
>
|
GetUnit(ounce[US_liquid], default, symbols, symbol);
|
| (2.3) |
>
|
GetUnit(meter, spellings, spelling, plural);
|
| (2.4) |
>
|
GetUnit(atmosphere[technical]);
|
![atmosphere, context = technical, default = false, conversion = 98066500*gram[SI]/(metre[SI]*second[SI]^2), prefix = false, symbol = atm, symbols = {atmos, atm}, spelling = atmosphere, plural = atmospheres, spellings = {atmosphere, atmospheres}, abbreviation = at, abbreviations = {at}](/support/helpjp/helpview.aspx?si=1867/file00867/math118.png)
| (2.5) |
>
|
GetUnit(atmosphere[technical], symbol, abbreviation);
|
| (2.6) |
|
|