IT-Consultant: Charles Pegge > OxygenBasic

FileName

(1/2) > >>

Pierre Bellisle:
I got an error when I compile if the .o2bas filename include some space in it.
Either from Oxide or a batch file.
Adding double-quotes does'nt help...

Example: D:\Dev\Oxygen\o2w7\co2.exe -32 "D:\Dev\Oxygen\o2w7\~code\Caption Icon04.o2bas"

I got the error: ERROR: Include file not found d:\dev\oxygen\o2w7\~code\caption.inc

Pierre Bellisle:
A legal filename can begin with, let's say "-A"
Like in D:\Dev\Oxygen\o2w7\co2.exe -32 -aCaption.o2bas
In that case the "-a" is misinterpreted as a compiler swicth.
Adding double-quotes resolve the situation.
Is there a place where I can find the exacts rules for feeding a command line to the compiler?

Added:
The co2.exe messagebox help  show the switches always before the <filename>
Aka: co2.exe -64 <filename> <optional filename>
Is there any problem putting thoses swicthes after filenames, [optional filename], [filename.res]
Seems OK to me...

Thank.

Charles Pegge:
Hello Pierre,

I have altered co2, oxide and peroxide to support file pathnames containing spaces. When compiling with co2 in a dos console, you now need to enclose the spacey filenames with double-quotes.

Update P10
https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenBasic050P10.zip

Zlatko Vid:
you always need to have filename with "" if you use spaces in names
simple:

chr(34) + file_name + chr(34)

Pierre Bellisle:
Hi Charles,

Double-quotes for filenames with space is a good news.
I guess Microsoft sees it that way too.

Note that <co2.exe -32 -aCaption.o2bas> do not contain any space and will continue to be ambigious,
It might a rare case, still is <-a> a switch, or part of the filename?
I will always use double-quotes in my pre-compiler to avoid any misinterpretation.

By curiosity, I wanted to know if I can put the switches after filenames.
With no confirmation, I will play safe to avoid possible future problems.

Thank you very much Charles.

Navigation

[0] Message Index

[#] Next page

Go to full version