BBjTemplatedString::getTerminatedFieldNumber

Description

In BBj 14.0 and higher, this method returns the field number of a BBjTemplatedString field, as defined by linefeed terminators.

Syntax

Return Value

Method

int

getTerminatedFieldNumber(string fieldname)

Parameters

Variable

Description

fieldname

The name of the field.

Return Value

Returns the field number based on use of linefeed terminators.

Remarks

As long as this field is not a BLOB type, and no BLOB types appear before this field in the record, this value represents the "field number" that would be used in an MKEYED key definition if the template were treated as a record descriptor.

Example

rem ' BBjTemplatedString

t$ = "state:c(2),name:c(25+=8),capital:c(25**=9),pop:n(6*),size:n(5*=)"

t! = bbjapi().makeTemplatedString(t$)

print t!.fattr()

n! = t!.getFieldNames()

for f = 0 to n!.size() - 1

  f$ = n!.get(f)

  print ""

  print f$,

  print ",getFieldType=",t!.getFieldType(f$),

  print ",getFieldLength=",t!.getFieldLength(f$),

  print ",getFieldRepeat=",t!.getFieldRepeat(f$),

  print ",isFieldTerminated=",t!.isFieldTerminated(f$),

  print ",getFieldTerminator=",t!.getFieldTerminator(f$),

  print ",isFieldTerminatorEscaped=",t!.isFieldTerminatorEscaped(f$),

  print ",isFieldEOSTerminated=",t!.isFieldEOSTerminated(f$),

  print ",isFieldPadded=",t!.isFieldPadded(f$),

  print ""

next f

See Also

String Templates

BBjAPI

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.