Numerical Commands

ABS
CEILING
DECIMAL
FLOOR
HH:MM:SS
NUMBER
NUMBER COUNT
ROUND
STRING


ABS

Returns the absolute val­ue of a number

Format: ABS (num­ber)

Arguments: num­ber: numer­i­cal expression

Available: Available for all win­dows Version: 9 and later

Example: 

show abs(-5*2)
Returns 10


CEILING

Returns a num­ber which has the num­ber round­ed up to the spec­i­fied num­ber of dig­its from the dec­i­mal point. If you need to dis­play a cer­tain num­ber of dig­its after the dec­i­mal point use the dec­i­mal command

Format: CEILING (num­ber num­ber of digits)

Arguments: num­ber: numer­i­cal expres­sion num­ber of dig­its: if pos­i­tive the num­ber of dig­its to show at the right of the dec­i­mal point. If neg­a­tive the num­ber of dig­its to the left of the dec­i­mal point start­ing at tens. If 0 no dec­i­mal plac­ing will be left

Available: Available for all win­dows Version: 9 and later

Example: 

show CEILING (34.23001, 2)
Returns 34.24

show CEILING (3423.456, -2)
Shows 3500

show dec­i­mal ( CEILING(0.1,0) 2)
Shows 1.00


DECIMAL

Returns a string which has the num­ber to the spec­i­fied num­ber of dig­its from the dec­i­mal point. The num­ber is always round­ed down

Format: DECIMAL (num­ber num­ber of digits)

Arguments: num­ber: numer­i­cal expres­sion num­ber of dig­its: if pos­i­tive the num­ber of dig­its to show at the right of the dec­i­mal point. If neg­a­tive the num­ber of dig­its to the left of the dec­i­mal point start­ing at tens. If 0 no dec­i­mal plac­ing will be left

Available: Available for all win­dows Version: 9 and later

Example: 

show DECIMAL (34.235, 2)
Shows 34.23 

show DECIMAL (3423.456, -2)
Shows 3400

show DECIMAL ( round(0.499,0) 2)
Shows 0.00


FLOOR

Returns a num­ber which has the num­ber round­ed down to the spec­i­fied num­ber of dig­its from the dec­i­mal point. This is sim­i­lar to the dec­i­mal com­mand excepts that it returns a num­ber and not a string. If you need to dis­play a cer­tain num­ber of dig­its after the dec­i­mal point use the dec­i­mal command

Format: FLOOR (num­ber num­ber of digits)

Arguments: num­ber: numer­i­cal expres­sion num­ber of dig­its: if pos­i­tive the num­ber of dig­its to show at the right of the dec­i­mal point. If neg­a­tive the num­ber of dig­its to the left of the dec­i­mal point start­ing at tens. If 0 no dec­i­mal plac­ing will be left

Available: Available for all win­dows Version: 9 and later

Example: 

show FLOOR (34.235, 2)
Returns 34.23 

show FLOOR (3423.456, -2)
Shows 3400 

show dec­i­mal ( FLOOR(0.999,0) 2)
Shows 0.00


HH:MM:SS

Specify the time in hours, min­utes and seconds

Format: HH:MM:SS

Arguments: HH: hours MM: min­utes SS: seconds

Available: Available for all win­dows Version: 9 and later

Example: 

show count instances where start time > 00:01:01.45
Show a count of all the instances that have a start time greater than 1 minute, 1.45 seconds


NUMBER

Returns a num­ber from the giv­en string or instances

Format: NUMBER (string) OR NUMBER (instances) OR NUMBER (instances , group_​name) OR NUMBER (instances , index) OR NUMBER (instances , group_​name, index)

Arguments: string: a string that can be con­vert­ed to a num­ber. An emp­ty string “” will con­vert to 0. Spaces are allowed. instances: instances that are to be searched for labels con­tain­ing num­bers. No label com­pu­ta­tions to cre­ate instances allowed (pre­com­pute instances into a vari­able and use that vari­able) group name: Only labels with this group name will be searched for num­bers index: The Nth num­ber to use (1 = first, 2 = sec­ond…). Negative val­ues will count from end (-1 = last). 0 is not valid

Available: Available for all win­dows Version: 10 and later

Example: 

show NUMBER (“ -5 ”) + 8
Shows 3 

show NUMBER (“”)
Shows 0 

show NUMBER (“3e”)
Will pro­duce an error 

show NUMBER (instances)
Shows a num­ber from the first label with a valid number 

show NUMBER (instances,“player”)
Shows a num­ber from the first label with a group name play­er” that has a valid number 

show NUMBER ($a,2)
Shows a num­ber from the sec­ond label with a valid num­ber in it, that have been stored in the instances rep­re­sent­ed by $a 

show NUMBER (instance[1],“player”,-1)
Shows a num­ber from the last label with a group name play­er” that has a valid num­ber in it, in the first instance of the timeline


NUMBER COUNT

Count of valid num­ber in labels

Format: NUMBER COUNT (instances) OR NUMBER COUNT (instances , group_name)

Arguments: instances: instances that are to be count­ed for labels con­tain­ing num­bers. No label com­pu­ta­tions to cre­ate instances allowed (pre­com­pute instances into a vari­able and use that vari­able) group name: Only labels with this group name will be counted

Available: Available for all win­dows Version: 9 and later

Example:

show NUMBER COUNT (instances)
Shows how many labels with a valid number

show NUMBER COUNT (instances,“player”)
Shows how many labels with a group name play­er” that have a valid number

show NUMBER COUNT ($a)
Shows how many labels with a valid num­ber, that have been stored in the instances rep­re­sent­ed by $a

show NUMBER COUNT (instance[1],“player”)
Shows how many labels with a group name play­er” that has a valid num­ber in it, in the first instance of the timeline


ROUND

Returns a num­ber which has the num­ber round­ed to the spec­i­fied num­ber of dig­its from the dec­i­mal point. It will round up or down depend­ing on which is the clos­est dig­it. If you need to dis­play a cer­tain num­ber of dig­its after the dec­i­mal point use the dec­i­mal command

Format: ROUND (num­ber num­ber of digits)

Arguments: num­ber: numer­i­cal expres­sion num­ber of dig­its: if pos­i­tive the num­ber of dig­its to show at the right of the dec­i­mal point. If neg­a­tive the num­ber of dig­its to the left of the dec­i­mal point start­ing at tens. If 0 no dec­i­mal plac­ing will be left

Available: Available for all win­dows Version: 9 and later

Example: 

show ROUND (34.235, 2)
Returns 34.24

show ROUND (3423.456, -2)
Returns 3400 

show dec­i­mal ( ROUND(0.499,0) 2)
Shows 0.00


STRING

Returns a string from the giv­en num­ber or instances

Format: STRING (num­ber) OR STRING (instances , group_name)

Arguments

num­ber: a numer­i­cal expression

instances: instances that are to be searched for labels in the spec­i­fied group

group_​name: Only labels with this group name will be searched

Available: num­ber for­mat avail­able for all win­dows, instances for­mat avail­able for code win­dows only

Version: num­ber for­mat avail­able on ver­sion 10 and lat­er, instances for­mat avail­able on ver­sion 11.2.7 and later

Example:

show STRING (3 + 2) + 2

Shows 52

$play = instances where row = Possession” lim­it -1, 1

show STRING ($play,”Play”)

Shows the first label with a group name Play” in the last instance in row Possession”