FUNCTION thisFunction(mAA)
do this
to that
mAA.lights.Push("light1")
END FUNCTION
function pxml()
for i= 0 to anothervalue.count()-1
associativearray={
x: value1[i],
y: value2[i],
z: value3[i]
}
xarray.Push(associativearray)
m.myarray=xarray
end function
function getmyarray()
plist=[]
plist=m.myarray
?"Count of plist. . ."plist.count()
end function
end for
function pxml()
for i= 0 to anothervalue.count()-1
associativearray={
x: value1[i],
y: value2[i],
z: value3[i]
}
m.myarray.Push(associativearray)
end function
function getmyarray()
?"Count of m.myarray. . ."m.myarray.count()
end function
end for
function pxml(values as Object)
m.myarray = []
for i = 0 to values.count()-1
aa = { x: values[i], y: values[i]*2, z: values[i]*3 }
m.myarray.Push(aa)
end for
end function
function getmyarray()
print "Count of m.myarray = "; m.myarray.count()
end function
function RunUserInterface()
pxml([42,43])
getmyarray()
end function
Sub RunUserInterface()
o = setup()
o.setup()
o.GetData()
o.channelloop()
End Sub
Function GetData() AS OBJECT
facade = CreateObject("roOneLineDialog")
facade.SetTitle("Retrieving Program Information. . .")
facade.ShowBusyAnimation()
facade.Show()
xmlxfer=CreateObject("roUrlTransfer")
xmlport=CreateObject("roMessagePort")
xmlxfer.SetMessagePort(xmlport)
tvguide="http://xxx.xxx.x.xx:xxxxx/myfile.xml"
xmlxfer.SetUrl(myfile)
response=xmlxfer.GetToFile("tmp:/status.temp3")
readxml=ReadAsciiFile("tmp:/status.temp3")
xml = CreateObject("roXMLElement")
IF xml.Parse(readxml)
?"XML PARASED. . ."
programinfo=[]
programlist=[]
For i= 0 to xml.programme.count()-1
programinfo={
date: xml.programme[i]@start,
time: xml.programme[i]@start,
title: xml.programme[i].title.gettext()
channel: xml.programme[i]@channel 'GET CHANNEL
}
?"SHOW DATE. .."programinfo.date
?"SHOW TIME. . ."programinfo.time
?"SHOW TITLE. . ."programinfo.title
?"SHOW CHANNEL. . ."programinfo.channel
m.programlist.Push(programinfo)
End For
?"PROGRAMLIST CREATED. . ."
?"PROGRAMLIST COUNT. . ."m.programlist.count()
else
?"DIDN'T PASS. . ."
END IF
End Function
Function ChannelLoop() as object
index=0
while true
msg = wait(0, m.port)
if msg <> invalid
if (msg.isRemoteKeyPressed())
id = msg.GetIndex()
if id=2
programinfo=HoldIndex(index)
'?"PROGRAMIFNO. . ."programinfo.count()
endif
end while
End Function
FUNCTION HoldIndex(index)
?"HOLDINDEX PROGRAMLIST COUNT. . ." m.programlist.count()
return m.programlist
end function
A block (such as FOR/NEXT or IF/ENDIF) was not terminated correctly. (compile error &hb5) in pkg:/source/main.brs(52)