Hello,
how can I optimize following code statement:
ClientCnx.AnswerPage( Flags,
'',
NO_CACHE,
sitename_system,
nil,
['NOW', DateTimeToStr(Now),
'TITLE', 'SVPC Version ' + cversion],
'DEVICE_STATUS_01',
Color2Text(DeviceStatus_To_Color(SVPCSystem[1].typ,
SVPCSystem[1].zustand, SVPCSystem[1].zustand2, SVPCSystem[1].config)),
'DEVICE_DESTINATION_01', Ort,
'DEVICE_LINK_01', sitename_device+'?device=01',
'DEVICE_STATUS_02',
Color2Text(DeviceStatus_To_Color(SVPCSystem[2].typ,
SVPCSystem[2].zustand, SVPCSystem[2].zustand2, SVPCSystem[2].config)),
'DEVICE_DESTINATION_02', SVPCSystem[2].Ort,
'DEVICE_LINK_02', sitename_device+'?device=02',
'DEVICE_STATUS_03',
Color2Text(DeviceStatus_To_Color(SVPCSystem[3].typ,
SVPCSystem[3].zustand, SVPCSystem[3].zustand2, SVPCSystem[3].config)),
'DEVICE_DESTINATION_03', SVPCSystem[3].Ort,
'DEVICE_LINK_03', sitename_device+'?device=03',
'DEVICE_STATUS_04',
Color2Text(DeviceStatus_To_Color(SVPCSystem[4].typ,
SVPCSystem[4].zustand, SVPCSystem[4].zustand2, SVPCSystem[4].config)),
'DEVICE_DESTINATION_04', SVPCSystem[4].Ort,
'DEVICE_LINK_04', sitename_device+'?device=04',
'DEVICE_STATUS_05',
Color2Text(DeviceStatus_To_Color(SVPCSystem[5].typ,
SVPCSystem[5].zustand, SVPCSystem[5].zustand2, SVPCSystem[5].config)),
'DEVICE_DESTINATION_05', SVPCSystem[5].Ort,
'DEVICE_LINK_05', sitename_device+'?device=05',
....
'DEVICE_STATUS_32',
Color2Text(DeviceStatus_To_Color(SVPCSystem[32].typ,
SVPCSystem[32].zustand, SVPCSystem[32].zustand2, SVPCSystem[32].config)),
'DEVICE_DESTINATION_32', SVPCSystem[32].Ort,
'DEVICE_LINK_32', sitename_device+'?device=32'])
Has anyboday an idea how this code can be written easier ? Maybe with an
loop ??
best regards
Stefan
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be