> how can I optimize following code statement:

What do you mean by "optimize" ?

> Has anyboday an idea how this code can be written easier ? 
> Maybe with an loop ??

You could probably replace the "array of const" by a loop. 
See how AnswerPage is implemented, you have full source code :-)

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


----- Original Message ----- 
From: "Stefan Blankenagel" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Monday, May 15, 2006 3:07 PM
Subject: [twsocket] Hint for HTTP Server


> 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
-- 
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

Reply via email to