×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Convert Code To Clarion 6 Help

## Convert Code To Clarion 6 Help

(OP)
Good Day,

Can someone help me convert the following to Clarion? Any help would be highly appreciated.

getstatus:
locate 4,40:print" ";
open "com1:4800,e,8,1" as #1
print #1,chr$(240+unitnumber%); 'FX X=unit number delay 0.01 print #1,chr$(16*curhose%); 'Y0 Y=hose number
delay 0.01
print #1,chr$(176); 'B0 End of command delay 0.1 'Wait for reply buff%=loc(1) 'Length of input buffer if buff%=0 then 'NO REPLY (OPEN LOOP) S%=14 close #1 return end if on error goto stayalive1 recstrg$=input$(buff%,#1) if buff%=4 then ' Should be xmitted plus rec'd bytes if mid$(recstrg$,2,1)=chr$(16*curhose%) then 'Check echo
select case right$(recstrg$,1)
case chr$(224) 'ERR S%=0 locate 4,40:print "ERR"; case chr$(225) 'OFF
S%=1
locate 4,40:print "OFF";
case chr$(226) 'CALL S%=2 locate 4,40:print "CALL"; case chr$(227) 'BUSY
S%=3
locate 4,40:print "BUSY";
case chr$(228) 'FIN S%=4 locate 4,40:print "FIN"; case chr$(229) 'ALONE
S%=5
locate 4,40:print "LONE";
case chr$(230) 'LEAK S%=6 locate 4,40:print "LEAK"; case chr$(231) 'PERR
S%=7
locate 4,40:print "PERR";
case chr\$(232) 'AUND
S%=8
locate 4,40:print "AUND";
case else 'UNDEFINED
S%=15
locate 4,40:print "UNDEFINED";
end select
else 'ECHO INCORRECT
S%=13
end if
else
S%=12 'INCORRECT NUMBER OF CHARACTERS
end if
recover1:
close #1
return

stayalive1:
S%=11 'TRANSMISSION ERROR
resume recover1

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!