Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

XDXCreateDisplayComponent Function

Overview

The XDXCreateDisplayComponent function assembles parameters to create the display component.

Syntax/Parameters

Syntax

string = XDXCreateDisplayComponent ( dword flags );

string = XDXCreateDisplayComponent ( string data[] );

Parameters

flags

A dword specifying various bits to create the component. See Remarks below.

data

A string array containing named parameters. See Remarks below.

Return Value

A string containing coded component for an engram or an empty string on failure. Use the GetLastError function to retrieve a formatted error code and GetLastErrorMessage for additional detail.

Remarks

Component parameters can be provided as the bitwise flags or using a string array with named keys. This function is the reciprocal of the XDXGetDisplayFlags and XDXGetDisplayProperties functions, respectively. The flags are as follows:

  Definition   Bitwise   Description  
  Display Types          
    XDX_DISPLAY_TYPE_MASK   0xF0000000   Type Mask  
    XDX_DISPLAY_GENERAL   0x00000000   General (No extra formatting)  
    XDX_DISPLAY_CARDINAL   0x10000000   Cardinal Type (five hundred thirty)  
    XDX_DISPLAY_CARDINAL_MIX   0x20000000   Cardinal Mixed Type (5.3 hundred)  
    XDX_DISPLAY_DATE   0x40000000   Dates (May 3, 2011 or Feb 2011)  
    XDX_DISPLAY_ISODURATION   0x80000000   ISO Duration  
  Date/Duration Type Flags          
    XDX_DISPLAY_ISO_MASK   0x0F000000   ISO Mask  
    XDX_DISPLAY_ISO_FULL   0x00000000   Assume Full Duration (3 Years, 6 months)  
    XDX_DISPLAY_ISO_YEARS   0x01000000   Assume Years (ie 3 -> 3 Years)  
    XDX_DISPLAY_ISO_MONTHS   0x02000000   Assume Months (ie 3 -> 3 Months)  
    XDX_DISPLAY_ISO_WEEKS   0x03000000   Assume Weeks (ie 3 -> 3 Weeks)  
    XDX_DISPLAY_ISO_DAYS   0x04000000   Assume Days (ie 3 -> 3 Days)  
    XDX_DISPLAY_ISO_HOURS   0x05000000   Assume Hours (ie 3 -> 3 Hours)  
  Partial Types          
    XDX_DISPLAY_PERCENT   0x00100000   Is Percent (x100)  
  Additional Formatting          
    XDX_DISPLAY_NONEFORZERO   0x00000001   None for 0 (None in text)  
    XDX_DISPLAY_NOFORZERO   0x00000002   No for 0 (No in text)  
    XDX_DISPLAY_DASHFORZERO   0x00000004   - for 0 (- is normally nil)  
    XDX_DISPLAY_NOCOMMAS   0x00000008   No Commas in number  
    XDX_DISPLAY_USENEGATIVE   0x00000010   Use Negative Sign instead of parans  
    XDX_DISPLAY_INVERT   0x00010000   Invert Value  

 

The key names are as follows:

  Definition   Description  
  type  

Type of display, can be:

general — General (No extra formatting)
cardinal — Cardinal Type (“five hundred thirty”)
cardinal_mixed — Mixed Type (“5.3 hundred”)
date — Dates (“May 3, 2011” or “Feb 2011”)
duration — ISO Duration (“Three Months”)

 
  duration  

If the type is date or duration, the value can be:

full — Full duration (1 year, 6 months)
years — Duration in years (2 years)
months — Duration in months (6 months)
weeks — Duration in weeks (2 weeks)
days — Duration in days (5 days)
hours — Duration in hours (12 hours)

This key name will not be present if the type is not relevant.

 
  percent   This key name will be present and the value “true” is associated value is a percentage.  
  none_for_zero   This key name will be present and the value “true” is associated number represented by “none”.  
  no_for_zero   This key name will be present and the value “true” is associated number represented by “no”.  
  dash_for_zero   This key name will be present and the value “true” is associated number represented by “-” or a dash.  
  no_commas   This key name will be present and the value “true” is associated value numeric without commas.  
  use_negative   This key name will be present and the value “true” is associated numeric uses a ‘-’ sign rather than ( ) to indicate a negative number.  
  invert   This key name will be present and the value “true” is associated numeric value with the sign flipped.  

 

If the returned string is empty, it is likely an error occurred.

The reciprocal functions are XDXGetDisplayProperties and XDXGetDisplayFlags.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic