I just want to debug my subsequence and see its parameter represented as "0b0000000000011010" when I supply a literal value of 26.
Ok, I try to be more explicit and show my problem using your suggestion: (The resulting sequence file is attached.)
- Create a new sequence file.
- Insert a new sequence "Sequence".
- In "Sequence", create a parameter "Parameter" of type "Number".
- Change the numeric format of "Parameter" to Binary with a minimum of 16 digits and *without radix*, ie. "%.16b". (In the other sequence file I used "%#.16b".)
-> Intention: I want to see the supplied parameter value in this numeric format when debugging or converting to a string using Str().
- Still in "Sequence", create a local "Local" of type "Number".
- Change the numeric format of "Local" to the same as above, "%.16b".
-> Intention: I want to demonstrate your way here, which actually works (I can use it as the "reference string" of the yet-to-be-defined message box), but does in an indirect way what I want to do directly using only sequence parameters.
- Insert a "Statement" step in "Sequence".
- Of "Statement", "Edit Expression" and use "Locals.Local = Parameters.Parameter" as the expression.
- Insert a "Message Popup" step in "Sequence".
- Of "Message Popup", do "Edit Message Settings", and use the following expression as the Message Expression:
"I have this: " + Str(Parameters.Parameter) + "\n" +
"I want this: " + Str(Locals.Local)
- Insert a "SequenceCall" step in MainSequence.
- Point "SequenceCall" to sequence "Sequence" of the current file and supply exactly the literal value 26 for the parameter.
- In "MainSequence", create a local "Local" of type "Number".
- Change the numeric format of this "Local" to something very dangerous, eg. "%9.16o".
- Assign the exact numeric value 4616 to this "Local" variable.
-> Intention: I want to demonstrate that there are cases where a propagation of numeric formats to subsequences can actually be more than a mere nuisance.
- In "MainSequence", insert a second Sequence Call step, "SequenceCall_2".
- Let "SequenceCall_2" call the same sequence "Sequence", but supply Locals.Local for the parameter.
- Now run the sequence file in "Single Pass" mode.
- In the first popup, you see that I get the (binary!) representation 0000000000011010 only for the local variable, but I also want it for the parameter value.
- In the second popup, you see that I get the (octal!) representation 0000000000011010 for the parameter value, which would be correct (for what I want) if I had supplied the decimal literal 26 again. You see that the binary representation is something entirely different here!
I hope you now get the point. Thanks for answering!