Versions Compared

Key

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

...

The writing mechanism with "~Name"

Mode%=0 

Assume LPP=33.37 with the cell width in de knowledge base defined as 6 

TEMPLATE$("Length between PP: ~LPP [m]", 0, LPP) 

Steps taken bij Quaestor:

  1. Remove ~LPP:

     Length between PP:

     

    [m]

  2. Write value "33.37 " from position ~ :

     Length between PP: 33.37

     

Result:

In this case, insufficient spaces are left in the template between ~LPP and [m].

Mode%=1 

To obtain a better result, you can used the ReplaceMode%ReplaceMode%=1:

TEMPLATE$("Length between PP: ~LPP [m]", 1, LPP) 

Steps taken bij Quaestor:

...

The writing mechanism with "#ParName#"

Assume LPP=33.37 with Assume with the cell width in de knowledge base defined as 6

TEMPLATE$("Length between PP: #LPP# [m]", 0, LPP)

Steps taken bij Quaestor:

  1. Remove #LPP#: Length between PP:  [m]
  2. Insert value "33.25" from former starting position of #LPP#: Length between PP: 33.25 [m]

Result:

"Length between PP: 33.25 [m]"

The writing mechanism with "#Parname|Format$#"

Assume LPP=33.37 with Assume  with the cell width in de knowledge base defined as 6

TEMPLATE$("Length between PP: #LPP|E8.3# [m]", 0, LPP)

 Result:"Length between PP: 0.334E+02 [m]"

The writing mechanism with "#Boolean Expression[Label]#Text to be placed[Label]"

TEMPLATE$("The model will be fitted with#NPROP=2[1]# two propellers and[1]#NPROP=1[1]# one propeller and[1] all appendages", 0, NPROP)

NPROP will be determined by Queastor because it is a parameter in this relation (InpVar).

This relation returns for NPROP=1 for  :

"The model will be fitted with one propeller and all appendages"

and returns for NPROP=2:

"The model will be fitted with two propellers and all appendages"

And for NPROP=0,

returns for :

And for ,"The model will be fitted with all appendages"

is returned.

In this example for both bolean actions the same label [1] is used. In "Text to be placed" further labels and nested logical constructs are allowed. However, Please note that [Label] in nested constructs should be different from [Label] of the surrounding construct. Using following numbers to label parts is a very convenient way.

The writing mechanism with nested "#Boolean Expression[Label]#Text to be placed[Label]"

TEMPLATE$("The model will be fitted with#NPROP>0[1]##NPROP=2[2]# two propellers and[2]#NPROP=1[2]# one propeller and[2][1] all appendages", 0, NPROP) 

This relation will give the same result as the previous example but now with a nested expression for NPROP.

...

Integer values can also be printed as words, however, only for 0-10:

TEMPLATE$("#NPROP|I2&English# propeller#NPROP><1[1]#s[1] fitted.", 0, NPROP)

Returns for NPROP=0(1)2 respectively:

"Zero propellers fitted." 
"One propeller fitted." 
"Two propellers fitted."

For NPROP=12

"No numeral {only 0-10} for: 12 propellers fitted."

for 

 respectively:

For 

is returned

The writing mechnisme for counters

A counter can be included in Template$ by "#&#", for example

TEMPLATE$("#&#) Wood 
#Option1[1]##&#) Polyester 
[1]#&#) Foam", 0, Option)

returns for Option=0:

"1) Wood 
2) Polyester 
3) Foam"

and for Option=1:

"1) Wood 
2) Foam"

returns for Option=0:

and for Option=1:

Instead Instead of integer counters, you can use english words first-tenth by using "%" instead of "&". For independent counters, the same principle is applied as above.

TEMPLATE$("#%#) Wood, #%%#) Polyester and #%%%#) Foam", 0)

returns:

"first) You see that Wood, first) Polyester and first) Foam"You see that Wood, Polyester and Foam all start Foam all start with first because they all have independent counters...

...

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

POT|A1|X2, RP|A1|X2, RE|A1|X2, PR|A1|X2, ITTC78|A1|X2, EX|A1|X2
DSNR|I18|X2, OVERL|A1, NKOL1|I4, NKOL2|I4, IUNITS|I4/| 
OWPOL(NT|I18|X2|1), OWDAT(NP|I18|X2|1)/| 
|M4|TEMPOWT|E18.11|X2, FAF|E18.11|X2, PGOE|E18.11|X2, C75D|E18.11|X2 
OWPOL(KQPC|E18.11|X2|6), OWPOL(KTPC|E18.11|X2|6), OWDAT(SCJ|E18.11|X2|30)/|

Line 1:

POT|A1|X2, RP|A1|X2, RE|A1|X2, PR|A1|X2, ITTC78|A1|X2, EX|A1|X2Line 1:

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

the same applies for RE, PR, IIT78 and EX

Line 2:

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

...