Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FiveGeneral Functions (continued)

PoolAppendAsPCData Function

Overview

The PoolAppendAsPCData function adds a converted version of a specified string to a String Pool Object.

Syntax/Parameters

Syntax

int = PoolAppendAsPCData ( handle hPool, string data, [int flags] );

Parameters

hPool

A handle specifying the String Pool object.

data

A string to add to the pool. This string will be processed during the append process.

flags

Optional int flags to direct the method of conversion.

The flags can be a combination of the following:

  Code Bitwise Value   Comment  
  SPO_PCDATA_ADD_BR   0x00000001   Replace 0x0D with <BR>  
  SPO_PCDATA_ADD_XML   0x00000002   Use XML for break <br /> the SPO_PCDATA_ADD_BR option must also be set.  
  SPO_PCDATA_NO_CODES   0x00000004   Don’t Dump In Code  
  SPO_PCDATA_LEAD_NBSP   0x00000008   Leading Spaces to Non-Breaking Space  
  SPO_PCDATA_UP_TO_UNICODE   0x00000010   Convert ANSI to UNICODE  
  SPO_PCDATA_NO_ESCAPE   0x00000020   Do Not Convert Escape Codes (no < > & conversion)  
  SPO_PCDATA_PASS_RETURNS   0x00000040   Pass Returns and Line Feeds  
  SPO_PCDATA_BACKSLASH_CODES   0x00000080   Process Backslashed Codes (processes \r and \n as return and line feed)  
  SPO_PCDATA_ESCAPE_QUOTE    0x00000100   Escape Quote (") Character  
  SPO_PCDATA_ACCEPT_UTF_8   0x00000200   Incoming Text is UTF-8  
  SPO_PCDATA_WRAP_LONG_LINES    0x00001000   Wrap Excessive Long Lines  
  SPO_PCDATA_PASS_THROUGH    0x00002000   Pass Through Everything Not Control  

 

Return Value

Returns an int containing the offset (location) where the appended string starts within the pool or a formatted error code on failure.

Remarks

The PoolAppendAsPCData function converts and adds the resulting characters to the existing string end position. The new string is concatenated with the existing strings in the pool. If the PoolPut or PoolOverlay functions are not used, the pool will consist of a single contiguous string. The source string is processed to be PCDATA safe content for HTML, converting escaped characters and entities as needed.

Related Functions

Platform Support

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

Legato IDE, Legato Basic