S        This expression allows you to dump a series of variables.

It is an advanced expression that should be used only for binary messages.

The first parameter specifies what index in the message the format should be read from.

The second parameter is the format of the message.


This expression is not available in UWP/HTML5, and will create an error if used there. If you want it ported, notify Phi.

Dump format

For each variable in the binary message, you should follow the below three step process.


First, if a variable is unsigned, specify the + as an indicator before the variable type. If + is not given, the variable is treated as signed.


For strings, this is invalid and should not be used; for floats, floats are always signed and so this should not be used.


Second, specify the variable type:

Name of variable

Symbol

1-byte integer (ASCII char)

c

2-byte integer (short)

h

4-byte integer (int)

i

4-byte floating point (float)

f

String (null-terminated)

s


Third, you can specify the count of the previous type to try to read. If not given, 1 is default.

For example, "+i+i+i" and "+i3" will get the same output.

Example dump strings

4 signed ASCII chars (A), an unsigned short (B), three unsigned integers (C):

"c4+h+i3"

 AABBCCC


1 signed short (A), one signed integer (B), an unsigned short (C), one signed integer (D):

"hi+hi"

 ABCCD


Fifty-three floats followed by a null-terminated string:

"f53s"


Bad formats:

"++c"   doubly unsigned is not a thing

"c-102" negative count of characters is not possible

"+s"    strings cannot be signed or unsigned

"+f"    floats are always signed

Output text

This output text has each variable on its own line. Hence, this expression should only be used for debugging.


Future upgrades may be done to allow numbers of sets of variables – for example, sets of one short then one string repeated.

Another potential upgrade would be outputting strings with predefined length rather than requiring null terminators.