Page 1 of 1

File Name macro tags

Posted: Fri Jan 28, 2005 6:40 pm
by Guest
Hi,
I am using Borland BP7. When use "$FN" in my command line the compiler complains even though the debug screen (nice featute by the way} reports the command line is correct. I suspect that the cpmmand line is just too long.

The reported error is --> Error 14: Invalid filename (c:\documents and settings\administrator.athlon1800\my documents\nextherm\NEXTHERM.PAS).

When I hard code the base file name into the compiler command all works well. So I tried the $PF and $PB macro tags but these macro tags appear to me empty strings. Is there a way to make this work?

Thanks,
Tim

Posted: Sat Jan 29, 2005 2:26 am
by jussij
When use "$FN" in my command line the compiler complains even though the debug screen (nice featute
by the way} reports the command line is correct.

The debug option always comes in handy when trying to get the configuration to work :)

What I usually do is copy the actuall command that Zeus is running from the debug window, which will be look somthing like this:

Code: Select all

c:\windows\system32\cmd.exe /c ........
I then use the Tools, Dos Shell menu to bring up a Dos window. From here I just paste the command directly into the Dos shell and run it. I then use the DOS prompt to debug the command line, making changes until it works. Finally I just go back to make the same changes to the Zeus configuration and hey presto, it should run fine inside of Zeus :D
I suspect that the command line is just too long.
That could well be the case. Windows NT has a limit of about 255 and Windows 98, Me has a limit of about 128 characters.
The reported error is --> Error 14: Invalid filename (c:\documents and settings\administrator.athlon1800\my documents\nextherm\NEXTHERM.PAS).
In the Zeus command line do you type the macro as $FN or as "$FN". Since the file
contains white space characters you need to type it in as "$FN" include the two quote characters.
When I hard code the base file name into the compiler command all works well. So I tried the $PF and $PB macro tags but these macro tags appear to me empty strings. Is there a way to make this work?

If you can hard code the command line in Zeus and it works then the macros option should also work. It is just a matter of getting the right macro tags :)

If the file name is too long you can use the $FB$EXT instead. These two macro will expand to the base file name plus the extension which in this case will be NEXTHERM.PAS. As you can see from the debug window, the Zeus compiler feature changes to the directory location of the NEXTHERM.PAS file, so you can get away with using just the base file name.

Cheers Jussi

Posted: Sat Jan 29, 2005 2:31 am
by jussij
For a bit more information about the Zeus macro tags use the Macros, Execute Script menu and type in ztag in the resulting dialog and hit the run button.

This will execute the zScript\ztag.lua macro, which displays some of the Zeus macro tags and their values based on the file currently active.

Cheers Jussi