il compiler (2)

M

Thread Starter

Mario de Sousa

Hi there again... :)

Jiri,

Do you think you can have the il compiler generate C code that uses the name of the xxx.il file as the default name for the module?

On line 177 of il2c.pl I have already replaced
plc_init("$ARGV", argc, argv);

but the trailing .il gets used. Can you please work the s/... perl magic and remove the trailing .il, if $ARGV ends in .il, and leave it be if it doesn't?

Thanks,

Mario (showing off his ignorance of perl).

--
----------------------------------------------------------------------------
Mario J. R. de Sousa
[email protected]
----------------------------------------------------------------------------

The box said it requires Windows 95 or better, so I installed Linux

_______________________________________________
LinuxPLC mailing list
Lin[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Mario:
> Do you think you can have the il compiler generate C code that uses the
> name of the xxx.il file as the default name for the module?

No worries - done. It uses the name of the first file.

(I probably never said so, but you can give the compiler several files, so you can make stepladder libraries that way, or do modular-ish development.)

> On line 177 of il2c.pl I have already replaced
> plc_init("$ARGV", argc, argv);

I'm not sure if you can do that - $ARGV refers to the current file, and by then all the files have been read through.


Jiri
--
Jiri Baum <[email protected]>
"In my opinion, the GPL is optimized to build a strong software community at the expense of a strong commercial software business model."
--Craig Mundie, Senior VP, Microsoft; 17 May 2001

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Top