lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>    if ptr=pointer(xEnviron) then begin
>> [...]
>> The tests "if 
ptr=...." would be also not required for the
>> same reason, a typecast 
could be used to deploy the pointer directly.
>
>Why don't you do that? 
It sounds like it would save you 16 lines of 
>duplicated code.

Hi 
Philipp,

I don't do that, for now, because may be the tables will have 
different behaviors. In reality these tables describe a "live" 
situation: what you see on the screen, what are the values a PLC is 
using at the moment, and so on. Changing "what you see on the screen" 
should result in the screen changing something, while changing a PLC 
value triggers a serial communication to update the PLC (which in turn 
will change something on the screen). This is the general idea, but 
everything is still to be done.

Anyway I like things like "save 16 
lines of code"! :-)
And even "save 2K of ram" :-)))

Regards,
Linuxfan