Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Simply seperated by comma's and/or spaces is described per line of the following part of an existing input template:

Line 1:

...

Write  as a string of one position (A1) followed by 2 spaces (X2),

the same applies

...

Line 2:

DSNR|I18|X2, OVERL|A1, NKOL1|I4, NKOL2|I4, IUNITS|I4/|

Write DSNR as for Line 2:Write  as an integer value in a cell of 18 positions (I18) followed by two spaces (X2),

Write OVERL as Write  as a string of one position

Write NKOL1 as Write  as an integer value in a cell of 4 positions (I4)

Write IUNITS as Write  as integer value in a cell of 4 positions followed by a Carriage return Linefeed ( CrLf ) as indicated by "/|" after the format.

Line 3:

OWPOL(NT|I18|X2|1), OWDAT(NP|I18|X2|1)/|

Write NT element 1 in object OWPOL as integer in Write  element 1 in object  as integer in a cell of 18 positions followed by two spaces (X2).

If object OWPOL is not present in the solution there are two options:

  1. The data slot of OWPOL contains a @DBDEFAULT, e.g.:

     @DBDEFAULT

     :0 (IT IS FOR OBJECTS ONLY ALLOWED TO USE ")" as DBDEFAULT) 
    In that case, all OWPOL formats are presenting a value of 0.

  2. The data slot of OWPOL does not contain a @DBDEFAULT In that case, all OWPOL formats are presenting a value of 0.

If in a format OWPOL(NT|I18|X2|1) OWPOL exists and NT does neither exist in OWPOL nor in the level(s) above, the @DBDEFAULT value of NT is printed if available or the message:

"NT has no DBDEFAULT"

Idem NP , however followed by CrLf as indicated by "/|" after the format

Line 4:

|M4|TEMPOWT|E18.11|X2, FAF|E18.11|X2, PGOE|E18.11|X2, C75D|E18.11|X2

|M4| is the line counter: each time when 4 values have been written, write a CrLf.

Idem Line 4:

Write  in E format using 11 decimals in a cell of 18 length (E18.11), followed by two spaces (X2).

Idem for ,  and . is fourth value from |M4| so write CrLf.

Line 5:

write 6 subsequent values of OWPOL(KQPC) with an E18.11 format Write TEMPOWT in E format using 11 decimals in a cell of 18 length (E18.11), followed by two spaces (X2).

Idem for FAF, PGOE and C75D.

C75D is fourth value from , each time when the line counter |M4| so write CrLf.

Line 5:

OWPOL(KQPC|E18.11|X2|6), OWPOL(KTPC|E18.11|X2|6), OWDAT(SCJ|E18.11|X2|30)/|

write 6 subsequent values of OWPOL(KQPC) with an E18.11 format followed by two spaces (X2), each time when the line counter |M4| reaches 4, a CrLf is written. If OWPOL contains 4 instead of the indicated 6 values, the 5th and 6th values are given the value zero.

Idem OWPOL(KTPC|E18.11|X2|6)

Idem OWDAT(SCJ|E18.11|X2|30), expect 30 cases in table OWDAT, if it contains fewer values, write missing values as 0.

After the 30 values, write a CrLf as indicated by "/|"

Writing parameters being part of a TeLiTab

A parameter being part of a TeliTab cannot be written as ~ParName|Format. In that case it should be either:

  1. ParName|Format
  2. #ParName|Format#.

Assuming a TeLiTab value of Obj$ of:


3 "RADIUS" "THICKNESS" "CHORD" 
"1" 0.250 54.0 495.4 
"2" 0.450 40.2 520.4 
"3" 0.600 21.0 543.7 
"4" 0.800 17.0 390.4 
"5" 1.000 9.1 14.5 

TEMPLATE$
"2nd thickness THICKNESS.2|F6.2/| 
3rd thickness: #THICKNESS.3|F6.2# [mm] 
4th thickness: ~THICKNESS.4|F6.1 
5th thickness: ~THICKNESS.5", 0, Obj$)

returns:

" 40.20 
3rd thickness: 21.00 [mm] 
String: "4th thickness: ~THICKNESS.4" cannot be Fixed (F) formatted 
5th thickness: 9.1"

Of the first line: "2nd thickness " is not included in the result because additional, non formatted string information is omitted when you use this definition, so only 

THICKNESS.2|F6.2/|

is returned, being:

" 40.20 
"

(including a CrLf)

The second line returns

"3rd thickness: 21.00 [mm]"

in which 21.00 is a trimmed F6.2 of 21

The third line includes an error message:

"String: "4th thickness: ~THICKNESS.4" cannot be Fixed (F) formatted"

because the total string

"4th thickness: ~THICKNESS.4"

is viewed as the value to be formatted F6.1

The last line returns

"5th thickness: 9.1"

The value 9.1 is the FF2 formatted value from which decimal closing zero's are trimmed.

Writing parameters being part of an object

An object can be treated like a TeLiTab.

if DATA is an object containing:


"DATA"
{
  0 
   2   "A" "B"
  "1"    1   2
  "2"    2   4
  "3"    3   6
  "4"    4   8
  "5"    5  10
  "6"    6  12
  "7"    7  14
  "8"    8  16
  "9"    9  18
  "10"  10  20
}

Then relation: 

TEMPLATE$("An example:
~DATA(A\3)
~DATA(B)",0,@DATA)

returns:

An example:
3.00 
     2.00
     4.00
     6.00
     8.00
    10.00
    12.00
    14.00
    16.00
    18.00
    20.00

The third case of A is taken followed by the content for B in the object. For both parameter no format decription is used (so the format of the Workbase/Slots & Properties is taken).

You can use format tags in the script: 

TEMPLATE$("An example:
~DATA(A\3)
~DATA(B|F12.3/|)",0,@DATA)

returns:

An example:
3.00 
       2.000
       4.000
       6.000
       8.000
      10.000
      12.000
      14.000
      16.000
      18.000
      20.000

The third case of A is taken without any format decription (so the format of the Workbase/Slots & Properties is taken). this is followed by the content for B in the object using a Cell width of 12 and 3 decimal places.
Please note, when you use format statement for paramters in the object, you have to close with a CrLf, thus "/|". otherwise all values will be placed behind each other:

TEMPLATE$("An example:
~DATA(A\3)
~DATA(B|F12.3)",0,@DATA)

returns:

An example:
3.00 
       2.000       4.000       6.000       8.000      10.000      12.000      14.000      16.000      18.000      20.000

Writing values using expressions

By placing expressions between brackets, you can first perform calculation of which the result will be placed:

 "Averaged draught trial condition      [m]   = ~(TFOR_INT/2+TAFT_INT/2) "

TFOR_INT and TAFT_INT will first be used to calculate the average draught. 

or

reaches 4, a CrLf is written. If OWPOL contains 4 instead of the indicated 6 values, the 5th and 6th values are given the value zero.

Idem 

Idem , expect 30 cases in table OWDAT, if it contains fewer values, write missing values as 0.

After the 30 values, write a CrLf as indicated by "/|"

Writing parameters being part of a TeLiTab

A parameter being part of a TeliTab cannot be written as ~ParName|Format. In that case it should be either:

  1. ParName|Format
  2. #ParName|Format#.

Assuming a TeLiTab value of Obj$ of:

returns:

Of the first line: "2nd thickness " is not included in the result because additional, non formatted string information is omitted when you use this definition, so only 

is returned, being:

(including a CrLf)

The second line returns

in which 21.00 is a trimmed F6.2 of 21

The third line includes an error message:

because the total string

is viewed as the value to be formatted F6.1

The last line returns

The value 9.1 is the FF2 formatted value from which decimal closing zero's are trimmed.

Writing parameters being part of an object

An object can be treated like a TeLiTab.

if DATA is an object containing:

Then relation: 

returns:

The third case of A is taken followed by the content for B in the object. For both parameter no format decription is used (so the format of the Workbase/Slots & Properties is taken).

You can use format tags in the script: 

returns:

The third case of A is taken without any format decription (so the format of the Workbase/Slots & Properties is taken). this is followed by the content for B in the object using a Cell width of 12 and 3 decimal places.
Please note, when you use format statement for paramters in the object, you have to close with a CrLf, thus "/|". otherwise all values will be placed behind each other:

returns:

Writing values using expressions

By placing expressions between brackets, you can first perform calculation of which the result will be placed:

 

 and  will first be used to calculate the average draught. 

orTEMPLATE$
"Company : #COMPANY$# 
Street & City: #STREET$ + CHR$(13) + CHR$(10) + SPACE$(15) + CITY$|#", 0, DEPT$, COMPANY$, 
STREET$, CITY$)

returns for:

COMPANY$= "Qnowledge"

STREET$="Haagsteeg 2"

CITY$="Wageningen"Company : Qnowledge 
Street & City: Haagsteeg 2 
Wageningen

The expression "STREET$ + CHR$(13) + CHR$(10) + SPACE$(15) + CITY$" is surrounded by "#" and terminated by "|".

...