Here's a bug I found in a program of mine, after much
exasperation trying to find out why this wasn't working.
You all might find it educational and/or entertaining.
I had this line of code:
rhdir::LoadFileList(RawFiles, "qgv??-raw.txt");
Basically, it looks for files in the current directory
named "qgv??-raw.txt" (where the question marks are
being used in the context of wildcard characters),
and loads the names of all such files into a
std::list<std::stringobject named "RawFiles".
Seems very simple.
And yet, although I had a bunch of files named:
qgv17-raw.txt
qgv32-raw.txt
qgv88-raw.txt
none of them were getting into the list. What went
wrong?
You ain't gonna believe this....
The function LoadFileList() was actually looking for
a file named "qgv~raw.txt", and since there was no
such file, the "RawFiles" list remained empty.
Why?
The answer is: the character sequence ??- is NOT
three characters! It's ONE character, a tilde ~ .
It's one of those blasted "triglyph" thingies left
over from the days when certain characters weren't
actually on keyboards and had to be "faked".
So I backslashed the question marks:
rhdir::LoadFileList(RawFiles, "qgv\?\?-raw.txt");
and the program worked fine. Live and learn.
--
Cheers,
Robbie Hatley
lonewolfintj aatt pacbell dott net
triple-dubya dott tustinfreezone dott org 1 2649
"Robbie Hatley" <bo***********@no.spamwrote in message
news:rc***************@newssvr17.news.prodigy.net. ..
>
Here's a bug I found in a program of mine, after much
exasperation trying to find out why this wasn't working.
You all might find it educational and/or entertaining.
I had this line of code:
rhdir::LoadFileList(RawFiles, "qgv??-raw.txt");
Basically, it looks for files in the current directory
named "qgv??-raw.txt" (where the question marks are
being used in the context of wildcard characters),
and loads the names of all such files into a
std::list<std::stringobject named "RawFiles".
Seems very simple.
And yet, although I had a bunch of files named:
qgv17-raw.txt
qgv32-raw.txt
qgv88-raw.txt
none of them were getting into the list. What went
wrong?
You ain't gonna believe this....
The function LoadFileList() was actually looking for
a file named "qgv~raw.txt", and since there was no
such file, the "RawFiles" list remained empty.
Why?
The answer is: the character sequence ??- is NOT
three characters! It's ONE character, a tilde ~ .
It's one of those blasted "triglyph" thingies left
over from the days when certain characters weren't
actually on keyboards and had to be "faked".
So I backslashed the question marks:
rhdir::LoadFileList(RawFiles, "qgv\?\?-raw.txt");
and the program worked fine. Live and learn.
One of my compilers often complains that I've got "invalid triglyphs",
because in my comments when developing I often put ??? at the end of a
comment when I'm not sure of what I've written and want to come back and
revisit that point later. But I found that the compiler has an option to
turn off triglyph recognition entirely. Perhaps yours has that option?
-Howard This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Shawn Wilson |
last post by:
Hi,
Thought you might get a kick out of this. It happened a few days ago.
A couple years ago I set up a small database to hold the Portfolio information
(we're an ad agency) of the company I...
|
by: windandwaves |
last post by:
Hi Folks
I have just completed a project for an accommodation finder in New Zealand - much with your help - thank you again.
I would appreciate any constructive or deconstructive comments.
...
|
by: RamTurbo |
last post by:
RamTurbo 2.6
Increase your computer speed by up to 200%
Stop your computer from windows crashes
Recover 100% of memory leaks
Boost your PC memory and performance
Control running applications...
|
by: Gerald Bauer |
last post by:
Hello,
I invite you to cast your vote in the Year 2003 awards sponsered by
the Java Republic, the Saturn Times and the Richmond Post news blogs.
Here's the line-up:
* What is Your Scripting...
|
by: Vanilla Sky |
last post by:
In your butt
Put the boogie in your butt
Put, put the boogie in your butt
In your butt
Put the boogie in your butt
Put, put the boogie in your butt
I ain't puttin no boogie in nobody's butt...
|
by: WillWeGetOurFreedomBack |
last post by:
When I try to run the query below, I get a warning that says Access
could not insert ANY of the records due to Validation rule violations.
Access gives me NO hint WHICH fields are violating the...
|
by: Vortex Soft |
last post by:
http://www.junglecreatures.com/
Try it and tell me what's happenning in the Microsoft Corporation.
Notes:
VB, C# are CLS compliant
|
by: Mike Labosh |
last post by:
I am teaching a class at a local client's office to bring some VBA and Fox
programmers up to speed on VB.NET.
Four days of training to cover Forms, Web Apps, Services, XML, Console Apps,...
|
by: Gary Paris |
last post by:
It seems that you have a definite problem in life.
The way to solve your problem is to follow these simple steps.
First take a bootable floppy in reboot your computer.
At the A: Prompt, type...
|
by: oorga.power |
last post by:
Our 90 % percent work based on our mind.
all the successful person of this world won from mind. C Langugae is
great language, it needs logics. Logics can only give your logical
part of brain,...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |