Though not as prevalant these days, I remember some early DOS and windows programs not allowing you to start a filename with a number. Why? Doesn’t a computer simply store each character as a hexidecimal code?
I’m not sure about this–but i always thought it was a binary code. Either a 1 or a 0
WAG:
<i>Early</i> DOS had a built-in BASIC interpreter. So any lines you typed that began with a number were parsed and put into the active BASIC program buffer.
If you had a .COM or .EXE that began with a number, it’d be put into the BASIC program rather than being executed.
After DOS 3.0, BASIC wasn’t part of the package, and filenames could begin with digits as well as some other screwy characters.
Related story: Word Perfect Ver 4 would let you save a file with a space in the name. (It must’ve written the name directly to the directory.) But then when you tried to reopen it, WP couldn’t. And it also couldn’t be deleted using DOS, because there’d be too many parameters:
<i>del my file.wp</i>
I can’t remember <i>how</i> many times I had to fix one lady’s directory because she couldn’t remember not to use a space. :rolleyes:
Wrong thinking is punished, right thinking is just as swiftly rewarded. You’ll find it an effective combination.
DARNITDARNITDARNIT!!!
I’ve got HTML built-in to my typing! This is going to take some getting used to.
Wrong thinking is punished, right thinking is just as swiftly rewarded. You’ll find it an effective combination.
I worked with DOS as far back as version 1.8 and don’t recall that particular restriction on file names.
There may have been some software that had it (as AOL doesn’t allow it), but DOS didn’t have that restriction.
In early DOS, in order to run BASIC programs you needed to switch to BASIC via the BASIC command. You could not run BASIC via the C: prompt.
The spaces in DOS filenames could be worked around easily enough using the rename command. If the original (erroneous) file name was “my file.wp”, you can use
REN my*.wp myfile.wp
(Assuming there was only one file beginning with “my”).
“What we have here is failure to communicate.” – Strother Martin, anticipating the Internet.
You can also delete or rename files like that by enclosing the filename in quotes. IE,
del “my file.wp”
No version of MS-DOS or PC-DOS ever worked that way. Other systems, whether named “…DOS…” or not, may have.
Most programming languages (COBOL is an exception) do not allow variable names to begin with a digit. Some operating systems have followed the same rule for filenames, usually just for parallelism’s sake. But with most operating systems these days being based as much as possible on Unix, which never had that limitation, you don’t see it much anymore.
John W. Kennedy
“Compact is becoming contract; man only earns and pays.”
– Charles Williams
FYI: In many languages, symbols starting with a digit are interpreted as a number. In C and C++, octal number begin with a 0 (zero), and hex numbers begin with a 0x (zero ex). Thus 033 = 0x1B = 27.
He’s the sort to stand on a hilltop in a thunderstorm wearing wet copper armor, shouting ‘All Gods are Bastards!’
COBOL does not allow a variable to begin with a digit. It does allow paragraph names to begin with a digit. (Actually paragraph names can be entirely digits.)
Virtually yours,
DrMatrix
These words are mine and they are true - Chief Meninock