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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISL error Unexpected End of Line 1

Status
Not open for further replies.

manelandrea

Programmer
Jul 10, 2017
34
PH
So I was trying to display the array list in a ListDisplay but I kept on getting Unexpected End of Line error:

Code:
event rxmsg : success_reply
	rxmsg  success_msg
	window totalItems-1, 25
	ListDisplay totalItems-1, 1, detail_name
	waitforclear
	
	//infomessage success_msg 
endevent


endofLineError_ahm3cc.png


And would anyone can explain to me the syntax of window? I know that ListDisplay is rows,columns, arrayList
 
You're missing parameters. Documentation shows the arguments are row, column, list_size, array_variables.

You only have 3 arguments, not the 4 required.

Code:
ListDisplay

Function
This command is used to display a list (array) variable within a window. This command is useful when displaying the contents of an array variable that contains data received from a PMS, such as a list of names.

Syntax (entered as a single line)
ListDisplay row, column, list_size, array_variable

Argument/Description
row - the integer expression specifying the screen row within the defined window where the first array_variable entry will be displayed
column - the integer expression specifying the screen column within the defined window where first array_variable entry will be displayed
list_size - the number of array_variable entries to display
array_variable - the name of the user_variable that holds the matrix of values to be displayed

ListDisplay Usage
· The Window command must precede this command.
· It is acceptable to set list_size equal to 0, but if this is done, nothing will display. If the list_size is less than zero, an error will occur.
· Each entry will be placed on a separate line directly beneath the previous.

ListDisplay Example
The following script will display an employee list:
event rxmsg : emp_list
    var emp_list_size : n3
    var emp_list_array[12] : a40
    rxmsg emp_list_size, emp_list_array[ ]
    window 12, 42
l    istdisplay 1, 2, emp_list_size, emp_list_array
    waitforclear
endevent 
See also:

Window
 
Thank you @Moregelen! It's now working though I need to ask if you know how to send an array list response from C# to ISL? I tried sending back the same message format

"\u0001000000099prompt \u0002\u001c17 success_reply\u001c\u001cLA Way Dbl \u001cLA Way Sgl \u001cGarlic Tots \u001cGarlic Fries \u001cFrench Fries\u00030000\u0004"

But I kept getting the "Must have list var(DETAIL_LIST)" issue.

I think it was trying to look for the detail_list array response but since my message response just had the separators, I think it couldn't identify that what I'm throwing back is an array list for detail_list[]

ISL said:
event rxmsg : success_reply
var list_size : n3
var detail_list[totalItems-1] : a40
rxmsg detail_list[]
window totalItems-1, 42, "Details"
listdisplay 1, 2,2, detail_name
waitforclear

infomessage detail_list[1]
endevent

Would you know how to respond an array list? Thank you!



 
You must provide the array size in the return as the first parameter. SIM would look like this:

Code:
EVENT RXMSG : DISPLAY_CHECKS
	VAR COUNT : N9
	VAR CHECKSEQS[200] : N9
	RXMSG COUNT, CHECKSEQS[]

....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top