User`s guide

Table Of Contents
180 Chapter 12
Sample Application Programs
Controlling Using SICL-LAN Server
Status = ivprintf(addr, message & Chr$(10))
Exit Sub
ErrHandler:
MsgBox "*** Error : " & Error$
Call siclcleanup
End
End Sub
Receiving
The procedure corresponding to receiving ASCII format messages in communication is
EnterSiclLan (Example 12-4). EnterSiclLan uses the ivscanf function of SICL to receive a
message in ASCII format and store it into the output variable. The ivscanf function takes
the session information outputted from the iopen function, the format for output, and data
to be outputted as its parameters.
Syntax Status = ivscanf(addr,fmt,ap)
Variable
For information on the variable (Status) and the variable (addr), refer to Table 12-1,
“Variable (Status),” on page 179 and Table 12-2, “Variable (addr),” on page 179,
respectively.
NOTE In Visual Basic, variables must be declared as a fixed length string when receiving string
data using the ivscanf function.
Example 12-4 EnterSiclLan
Sub EnterSiclLan(addr As Integer, Query As String)
Dim Status As Integer
Dim actualcnt As Long
Dim res As String * 256
On Error GoTo ErrHandler
Status = ivscanf(addr, "%t", res)
Query = Trim(res)
Exit Sub
fmt
Description Format for output (input)
Data type Character string type
ap
Description Data to be outputted (output)
Data type Character string type