Page 1 of 1

Dots in filenames?

Posted: Mon Feb 20, 2017 2:16 pm
by XorA
Whats the deal with these on QDOS, I remember seeing the reason they are not allowed once upon a time. But can't remember it!

Re: Dots in filenames?

Posted: Mon Feb 20, 2017 2:20 pm
by vanpeebles
I think you need to use " " around a filename with a . in it, on a BBQL, and sometimes then I found it a bit fussy. I always avoid them and change it to _ first when using zips etc.

Re: Dots in filenames?

Posted: Mon Feb 20, 2017 2:40 pm
by tofro
QL S*Basic accepts two different variable types for filenames - Strings and Names

A string is typically either a variable of type string (marked by the "$" sign) or a string constant enclosed in single or double quotes. Once you put the string in quotes, S*Basic will accept basically any character in the file name, dots included.

To simplify file name input, S*Basic accepts names as well - Those need to follow the naming conventions (same as variable names) of S*Basic and may thus not contain dots and certain other special characters. Such names are also entered into the S*Basic name table and keep their case while the QL runs.

So, if you got a filename that includes special characters other than letters, numbers and underscore characters like dots, question or exclamation marks and the like, simply enclose it in quotes.

Tobias

Re: Dots in filenames?

Posted: Mon Feb 20, 2017 2:47 pm
by XorA
Thanks Tobias

That refreshes the old braincells nicely!

Re: Dots in filenames?

Posted: Wed Feb 22, 2017 11:11 pm
by ql_freak
With SBASIC on SMSQ/E (e.g. with QPC2 emualator) you can now use the fullstop ('.') in SuperBASIC names, and so you also can enter pathnames with fullstop without need for quotes. Albeit I recommend always to use quotes in SuperBASIC, as else every time you use a name, a name table entry is created for each unquoted filename.