Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I TRANSMIT a variable INTEGER

Status
Not open for further replies.

Dpott

Technical User
Sep 12, 2003
4
US
This will probably seem simple, but I am a beginner !
I need to set up a script to transmit an variable integer.
Here is the simple script which I am having trouble with !

proc main
integer i , ar1[10000]
integer f
f = 225471

for i = 1 upto 100
f = f - 250

transmit "l"
transmit "475"
transmit "^M"
transmit " "
transmit " "
transmit "a"
transmit "250^M"
transmit "r"
transmit "f"
; this is where I need to transmit my variable integer f. Obviously, this does not work as it is !
transmit f
transmit "^M"
transmit "c"
transmit "d"

ar1 = i
endfor
endproc
 
Add a string variable called say strf to your script, then replace transmit f with these two lines:

itoa f strf
transmit strf

You could also use this instead of the itoa command:

strfmt strf "%d" f

followed by the new transmit statement.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top