「ITTS:ITTS Scrip:Variable」修訂間的差異

出自ITTS
跳至導覽 跳至搜尋
(已建立頁面,內容為 "== Variable function == === Description: === This function allow you to assign variable ( a floating point value or string) and using some operon (+ - * / ) to cal…")
 
行 36: 行 36:
 
   
 
   
 
運算元
 
運算元
:abs: variable =ABS(P3),  absolute value
+
* abs: variable =ABS(P3),  absolute value
:+:variable = P3+P4
+
* +:variable = P3+P4
:-:variable = P3-P4
+
* -:variable = P3-P4
:*:variable = P3*P4
+
* *:variable = P3*P4
:/:variable = P3/P4
+
* /:variable = P3/P4
AND  : variable = P3 and P4  ( only allow integer). 0x01 and 0x10 => 0x00
+
* AND  : variable = P3 and P4  ( only allow integer). 0x01 and 0x10 => 0x00
OR  : variable = P3 or P4  ( only allow integer).      0x01 or 0x10 =>0x11
+
* OR  : variable = P3 or P4  ( only allow integer).      0x01 or 0x10 =>0x11
XOR  : variable = P3 xor P4  ( only allow integer). 0x11 xor 0x10 =>0x01
+
* XOR  : variable = P3 xor P4  ( only allow integer). 0x11 xor 0x10 =>0x01
     NOT : variable = NOT( P3)  ( only allow integer)
+
*     NOT : variable = NOT( P3)  ( only allow integer)
P4:  show number of nibbles.  
+
* P4:  show number of nibbles.  
P3= 0x0011, p4 =4    =>65518 (0xFFEE, )
+
* P3= 0x0011, p4 =4    =>65518 (0xFFEE, )
 
   
 
   
MIN:variable =MIN(P3,P4)
+
* MIN:variable =MIN(P3,P4)
MAX:variable =MAX(P3,P4)
+
* MAX:variable =MAX(P3,P4)
CTF:variable = SQRT(P3*P4)  , formula to get center frequency
+
* CTF:variable = SQRT(P3*P4)  , formula to get center frequency
POWER: variable = power(P3,P4)  ,
+
* POWER: variable = power(P3,P4)  ,
SQRT:variable = SQRT(P3) , sqrt (2) = 1.414
+
* SQRT:variable = SQRT(P3) , sqrt (2) = 1.414
 
   
 
   
>:Judgement    bigger
+
* >:Judgement    bigger
<:Judgement  smaller
+
* <:Judgement  smaller
>=:Judgement  equal or bigger
+
* >=:Judgement  equal or bigger
<=:Judgement  equal or smaller
+
* <=:Judgement  equal or smaller
==:Judgement  equal
+
* ==:Judgement  equal
<>:Judgement  not equal
+
* <>:Judgement  not equal
 
   
 
   
 
   
 
   

於 2020年3月23日 (一) 15:59 的修訂

Variable function

Description:

This function allow you to assign variable ( a floating point value or string) and using some operon (+ - * / ) to calculate or process it.

Section1: Variable Section2: variable name

example:

A, A2, AAA, BBB, xxx, abc,..... ( some of reserve word can't be assign as a variable)
if there is brance "{}" inside the process string please refer to Brance process

reserve word:

Field_Proc
Field_Show or
Date_Proc ( see more help Example 4)
&xxxxx ( start with "&" character ) => see more help Smart Format
ITTS_xxxx ( start with "ITTS_" character ) => see more help for ITTS share memory


Command :

Str=:Assign string to an Variable ( but not suport >,<,>=,<=,== function) (see example 0)
=:Assign variable =some value. (Extend function:please see Example 5)

Remark:

num of variables: limited under 256
name length limited under 64
variable type is Double (range from : 5.0 x 10^-324 .. 1.7 x 10^308)
num of string variables limited under 256
name length limited under 64
string variables string length : no limited

運算元

  • abs: variable =ABS(P3), absolute value
  • +:variable = P3+P4
  • -:variable = P3-P4
  • *:variable = P3*P4
  • /:variable = P3/P4
  • AND : variable = P3 and P4 ( only allow integer). 0x01 and 0x10 => 0x00
  • OR : variable = P3 or P4 ( only allow integer). 0x01 or 0x10 =>0x11
  • XOR : variable = P3 xor P4 ( only allow integer). 0x11 xor 0x10 =>0x01
  • NOT : variable = NOT( P3) ( only allow integer)
  • P4: show number of nibbles.
  • P3= 0x0011, p4 =4 =>65518 (0xFFEE, )
  • MIN:variable =MIN(P3,P4)
  • MAX:variable =MAX(P3,P4)
  • CTF:variable = SQRT(P3*P4) , formula to get center frequency
  • POWER: variable = power(P3,P4) ,
  • SQRT:variable = SQRT(P3) , sqrt (2) = 1.414
  • >:Judgement bigger
  • <:Judgement smaller
  • >=:Judgement equal or bigger
  • <=:Judgement equal or smaller
  • ==:Judgement equal
  • <>:Judgement not equal


P1 ( Parameter 1): min spec P2 ( Parameter 2): max spec P3 ( Parameter 3): Could be a Smart format P4 ( Parameter 4): Could be a Smart format