Follow-up: getting an integer out of a plain #scpiCmd
The spaces tip solved the substitution, thanks. For anyone hitting the same thing, two more steps were needed. What did not work: NS(int(value)) fails with "Expected a identifier" because of the literal replacement; NS( int( value ) ) parses but then fails with "Invalid digit in <100.0>" because the parameter arrives as text with a decimal point, and round() fails the same way underneath; :format: D0 changes the display only, verified with and without on two controls; and getElement with "." as the separator returns an empty value, because the separator is a regular expression and the dot matches every character - that one shows up as a read timeout rather than an error. Escaped as "[.]" it works. The full form for an advNumber control writing to an instrument that needs an integer:
#scpiCmd numSamples tx NS( getElement( value ,0,"[.]") )
:setvar: numSamplesVal = getElement(inputValue,0,"[.]")