11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Caché</strong> <strong>ObjectScript</strong> Functions$JUSTIFYReturns the value of an expression right-aligned within the specified width.$JUSTIFY(expression,width,decimal)$J(expression,width,decimal)ParametersexpressionwidthdecimalThe value that is to be right-aligned. It can be a numeric value, astring literal, the name of a variable, or any valid <strong>Caché</strong> <strong>ObjectScript</strong>expression.The number of characters within which expression is to beright-aligned. It can be a positive integer value, the name of aninteger variable, or any valid <strong>Caché</strong> <strong>ObjectScript</strong> expression thatevaluates to a positive integer.Optional — The position at which to place the decimal point withinthe width. It can be a positive integer value, the name of an integervariable, or any valid <strong>Caché</strong> <strong>ObjectScript</strong> expression that evaluatesto a positive integer.Description$JUSTIFY returns the value specified by expression right-aligned within the specified width.You can include the decimal parameter to decimal-align numbers within width. If you omitthe decimal option, $JUSTIFY truncates all trailing zeroes for decimal numbers.$JUSTIFY is especially useful for outputting formatted values with the WRITE command.ParameterswidthIf the value of width is greater than the number of characters inexpression (the usual case),$JUSTIFY right aligns the value of expression by inserting the necessary number of spacecharacters to its left. If the width is equal to or less than the number of characters in the valueof expression, $JUSTIFY returns the full value of the expression with no truncation.decimalThe decimal point position is calculated as the number of digits from the end of width.$JUSTIFY zero fills any positions remaining between the end of the expression value and236 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!