NO

Author Topic: PORC bug?  (Read 18194 times)

Mat

  • Guest
PORC bug?
« on: January 09, 2005, 02:36:56 AM »
Hello,

I'm having difficulty specifying path names with spaces in that include \b or \t with PORC. e.g., my rc file is:
Quote
1 RCDATA "c:\bps 2.exe"

And of course the file exists. It looks like \b and \t are being escaped. The error is:
Quote
PORC: xyz.rc(1): error: The filename, directory name, or volume label syntax is incorrect.

I cannot use the /I switch because there are too many files involved. I can replace \ with \\ and it works fine but  filenames shouldn't be escaped should they?

Btw, if these forums are really at 2.0.10 then you should upgrade right away. Theres been a huge security fix in 2.0.11 not to mention there was a virus targeting unpatched boards.

Thanks for any help,
Mat

Anonymous

  • Guest
Re: PORC bug?
« Reply #1 on: January 09, 2005, 05:16:37 AM »
Quote from: "Mat"
Hello,
I'm having difficulty specifying path names with spaces in that include \b or \t with PORC. e.g., my rc file is:
Quote
1 RCDATA "c:\bps 2.exe"

Mat


Try double slashes as in "C:\\bps 2.exe"

I found out the hard way that when specifying string literals in C you have to double the slashes to prevent it from reacting to formatters like \n \r \t etc.

Mat

  • Guest
PORC bug?
« Reply #2 on: January 09, 2005, 10:05:52 AM »
Thanks. That's what i'm doing now but i didn't think it was intended to work that way. Maybe it is designed like that though ;-)

Thanks again.

Anonymous

  • Guest
PORC bug?
« Reply #3 on: January 09, 2005, 11:42:32 AM »
Quote from: "Mat"
Thanks. That's what i'm doing now but i didn't think it was intended to work that way. Maybe it is designed like that though ;-)

Thanks again.


Pelle can clarify, I'm sure...

But, hey, if it's working....

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: PORC bug?
« Reply #4 on: January 09, 2005, 04:00:29 PM »
Yes, all quoted strings are handled the same by the resource compiler - escape sequences will be processed (\nnn, \xnnn, \b, \f, \n, \r, \t, \v, \?, \", \', \\). It doesn't matter if the string appears in a RCDATA or STRINGTABLE resource. I get the same behaviour when I test with Microsoft's resource compiler.

Pelle
/Pelle

Anonymous

  • Guest
Re: PORC bug?
« Reply #5 on: January 09, 2005, 07:51:49 PM »
Quote from: "Pelle"
Yes, all quoted strings are handled the same by the resource compiler


 :lol: You mean I got one right?  :lol:  

(Starting to feel less like a noob...)

Seriously though, you've been a big help to me in learning C Pelle and I am grateful to you for it.   I don't think I have it all figured out yet (in fact I know I don't) but it's rewarding to know I can correctly answer a few questions here and there...

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: PORC bug?
« Reply #6 on: January 09, 2005, 10:21:19 PM »
Quote from: "ldblake"
:lol: You mean I got one right?  :lol:

At your current rate, you will be teching me soon. Maybe Delphi wasn't a complete waste of time...   :lol:  :lol:

Pelle
/Pelle

Anonymous

  • Guest
Re: PORC bug?
« Reply #7 on: January 09, 2005, 10:37:09 PM »
Quote from: "Pelle"
Quote from: "ldblake"
:lol: You mean I got one right?  :lol:

At your current rate, you will be teching me soon. Maybe Delphi wasn't a complete waste of time...   :lol:  :lol:

Pelle


 Believe me, Delphi was a TOTAL waste of my time... 4 years worth of it.  And believe me, given my life history, I'm in a good position to know a waste of time when I see one  :oops:

Anyway... I'm happy to see you are pleased with my progress  :)  But I'm not kidding myself there's still a LOT to learn... After 20 years working in various dialects of Pascal, the learning curve is quite steep!

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
PORC bug?
« Reply #8 on: January 09, 2005, 11:16:11 PM »
I think you are doing just fine. I remember initially having a bit of a struggle myself with C - before I finally "got it", and started to appreciate C as a rather nice, and clean, language. Clean in the sense of not having 12 different ways of solving a task, like with many "higher" level languages. Personally, I have less complains with C, than with any other language I have tried. Hope you get that "a-ha" experience too...

Pelle
/Pelle

Anonymous

  • Guest
PORC bug?
« Reply #9 on: January 10, 2005, 02:18:00 AM »
Quote from: "Pelle"
I think you are doing just fine. I remember initially having a bit of a struggle myself with C - before I finally "got it", and started to appreciate C as a rather nice, and clean, language. Clean in the sense of not having 12 different ways of solving a task, like with many "higher" level languages. Personally, I have less complains with C, than with any other language I have tried. Hope you get that "a-ha" experience too...

Pelle


I think the big "A-Ha" came about 3 weeks ago.  It was kinda strange really... I was reaching a point of frustration trying to get my head around headers and libs (there has to be a relationship, but HOW?).  Not being shy to ask questions I hunted around and found some minimal information but ended up asking the webmaster at one of the sites.  He sent back a lovely explaination (i.e. there really is no relationship).  I then got busy on something else for a couple of days, came back to work through the next tutorial and there it was... I was "getting it!".  

Now it's a bunch of little ones... as I mess with and mess up each new experiment.  Overall, a pretty enjoyable experience...

I a gree, fwiw, that C is a clean, powerful and useful language.  Pascal has more stuff, asm more flexibility... but C hits the comprmise, which I think is it's source of power.  Not bad for a 35 year old programming language!

If I have one overall grumble it's the lack of freely available language documentation.  Not tutorials etc.  there are lots of them.  I mean the almost total lack of help files dealing with keywords, escape sequences, preprocessors, etc... like your help009 file but this time for the base language... preferably with examples.  It would have helped me enormously if the base language was documented as well as  the libraries.  As a learner, I still have to struggle with the syntax of some keywords and concepts and being able to hit F1 would be a real blessing.
C is a relatively simple language... but if you don't know it, you don't know it...  a help file would be a blessing.


 And... if I type  ":=" into one more C file, I'm gonna plotz!   :roll:

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
PORC bug?
« Reply #10 on: January 10, 2005, 04:18:08 PM »
I agree, more C documentation would be nice. Some form of tutorial would be nice too. The problem is that creating documentation isn't the most exiting thing in the world, and since English isn't my native language, it's a slow process for me.

Pelle
/Pelle

Anonymous

  • Guest
PORC bug?
« Reply #11 on: January 10, 2005, 06:00:52 PM »
Quote from: "Pelle"
I agree, more C documentation would be nice. Some form of tutorial would be nice too. The problem is that creating documentation isn't the most exiting thing in the world, and since English isn't my native language, it's a slow process for me.


Ok, how's this...

My first "job" in the computer industry was in technical documentation (writing service bulletins and such).  Of course I've written help files for my own code.  Soooooo....  :wink:

If you can provide me with an itemization of *all* keywords, data types, preprocessors, extensions and variations in P/C.  Even in point form... I'll volunteer to create a detailed help file for the base language.   Essentially what I need is a list to work from....

If I need more info, I'll ask and when I have a rough draft I'll submit it to you for approval.  Perhaps we can incorporate it into the distribution and make it searchable with F1.

And what do I get from this?   A far better understanding of the language!  
As my teachers used to tell me:  The best way to learn about something is to write about it.  

What you think?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
PORC bug?
« Reply #12 on: January 10, 2005, 07:18:00 PM »
Sounds like a great idea! Thanks!

In the help file, under Introduction -> ISO C99 syntax, there is a formal, and rather boring, list of syntax elements (keywords, escape-sequences, preprocessing directives...) but without any explanation at all. Maybe I can start with this, and add comments and sample code? This is for standard C, so I should also add descriptions for the (Microsoft) extensions. OK?

Pelle
/Pelle

Anonymous

  • Guest
PORC bug?
« Reply #13 on: January 10, 2005, 07:42:00 PM »
Quote from: "Pelle"
Sounds like a great idea! Thanks!

In the help file, under Introduction -> ISO C99 syntax, there is a formal, and rather boring, list of syntax elements (keywords, escape-sequences, preprocessing directives...) but without any explanation at all. Maybe I can start with this, and add comments and sample code? This is for standard C, so I should also add descriptions for the (Microsoft) extensions. OK?

Pelle


Frankly, I looked at that in awe... couldn't make sense of it at all.  Improving that part of your help file would be an excellent idea!

Mat

  • Guest
Re: PORC bug?
« Reply #14 on: January 17, 2005, 06:50:36 PM »
Quote from: "Pelle"
Yes, all quoted strings are handled the same by the resource compiler

Thanks for clearing that up!