F$CUNITS
Revision as of 08:36, 5 April 2019 by Darya.zelenina (talk | contribs) (Created page with "'''F$CUNITS''' is a lexical function that converts values between blocks, bytes, kilobytes, megabytes, gigabytes, and terabytes. =Syntax= F$CUNITS(num...")
F$CUNITS is a lexical function that converts values between blocks, bytes, kilobytes, megabytes, gigabytes, and terabytes.
Syntax
F$CUNITS(number [,from-units, to-units])
from-units:
- BLOCKS
- B
- KB
- MB
- GB
- TB
to-units:
- BLOCKS
- BYTES (supported only for BLOCKS to BYTES conversions)
- B
- KB
- MB
- GB
- TB
Example
$ WRITE SYS$OUTPUT F$CUNITS(1024) 512KB $ WRITE SYS$OUTPUT F$CUNITS(1024, "BLOCKS") 512KB $ WRITE SYS$OUTPUT F$CUNITS(1024, "BLOCKS", "BYTES") 512KB $ write sys$output f$cunits(512,"bytes","blocks") %DCL-W-CONFLICT, illegal combination of command elements - check documentation \BYTES\ $ write sys$output f$cunits(512,"b","blocks") 1BLOCKS $ write sys$output f$cunits(10000,"blocks","gb") 0GB