Looking for a few people willing to test!

This is a discussion on Looking for a few people willing to test! within the Projects and Job Recruitment forums, part of the Community Boards category; More weird stuff . . . Code: char c = '\'' ; Code: // End of file \ That last ...

  1. #31
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    More weird stuff . . .

    Code:
    char c = '\'';
    Code:
    // End of file \
    That last one compiles under gcc.
    Last edited by dwks; 08-21-2005 at 11:54 AM.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  2. #32
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    Or this . . .
    Code:
    strcpy(s, L"hippo");
    (the L means it's a unicode string.)
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #33
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    Code:
    
    #define SQUARE(x) \
        ((x)*(x))
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #34
    Banned
    Join Date
    Jun 2005
    Posts
    594
    that good useful stuff keep up your post, but may i recommend use of the edit button

  5. #35
    Banned
    Join Date
    Jun 2005
    Posts
    594
    ok im revising my entire code with an entirly new concept that
    going extremely well at this point. however what takes priority
    strings or comments?

    because im my compiler if i have "*/" in a string somewhere
    but just in the open code i put /* somewhere, it will comment
    out in the green color from there to the one in the string.

    but if i have "/*" and then somewhere later i have "*/"
    nothing happens?


    right now with only string being developed my current solution
    will out put the following with this code :

    Code:
    // multi-line single-line comment \
       this is a continuation of the comment
    
    char ch = '\\';
    const char *str = "\" \
                       blah";
    const char *str2 = "\"", str3 = "\"";
    /*/ /*/
    
    char c = '\'';
    char c1 = '\'\'\'\'\'\'\\\\';
    char c2 = '\'\'\'\'\'\'\\';
    i do realize half that code is not valid code,
    but i just messed around to see how it would handle it.

  6. #36
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    Strings and comments have equal priority. For example,
    Code:
    char s[] = "hippo /* hippo */ hippo";
    /* sets string to "hippo ... " */
    I can show you my parser if you like. It employs modes, normal mode, string mode, and comment mode.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #37
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    It isn't necessarily a matter of priority. It is a matter of state. If you are in the middle of a multi-line comment and a quotation mark is encountered, it should be treated just like any other character. The only thing that changes your state is an occurence of */. Likewise, the same may be said of strings. If you're in a string and you encounter a /* it makes no difference because everything is part of the string up to the next (un-escaped) ".

  8. #38
    Banned
    Join Date
    Jun 2005
    Posts
    594
    update on newest version im not posting the code yet,
    because it doesnt highlight keywords yet, im
    just working on comments and strings for now.
    later today after work ill be working on single line
    comments, and the \ slash thingy that you guys mentioned.

    Code:
    // multi-line single-line comment \
       this is a /* a midline comment */ continuation of the comment
    
    /* a mutli lined comment
    	which doesnt end till here */
    
    char ch = '\\';
    const char *str = "\" \
                       blah";
    const char *str2 = "\"", str3 = "\"";
    
    /*/ there is stuff in between here /*/
    /*/stuff inbetween here as well/*/
    /*//*/
    /*/ /*/
    
    /* another comment */
    
    char c = '\'';
    char c1 = '\'\'\'\'\'\'\\\\';
    char c1 = '\'\'\'\'\'\'\\';

  9. #39
    *this
    Join Date
    Mar 2005
    Posts
    498
    Heres what I came up with so far. Sorry if formatting is off my bros comp might have messed up the tabs and spaces.

    The Numbers function is still under debug, I'm mainly working on the basic design right now and tweaking it later but this is what I have working and its the code I am debugging right now.

    Note: Rename the hightlight.txt to highlight.ini
    Attached Files Attached Files
    Last edited by JoshR; 08-23-2005 at 12:12 PM.

  10. #40
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,047
    Okay, how about this:
    Code:
    int i = (int)int_num;
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  11. #41
    *this
    Join Date
    Mar 2005
    Posts
    498
    Some IDE's dont recognize the "multiline backslash comment":
    Code:
    // multi-line single-line comment \
       another line
    [edit]
    oops my mistake
    [/edit]
    Last edited by JoshR; 08-25-2005 at 06:08 PM.

  12. #42
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Really? I've got VS .NET 2003 and that works just fine...
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  13. #43
    *this
    Join Date
    Mar 2005
    Posts
    498
    Accidently had the other slash, but it still doesnt work under dev-c++

    Although VS .net 2003 does work.

  14. #44
    Banned
    Join Date
    Jun 2005
    Posts
    594
    ok this is my newest update, ive completed all but one section of
    the program and thsi is my current output

    Code:
    #include <iostream>
    #include<iostream>
    
    #define
    #define other stuff
    #define masturabation("woot")
    
    // multi-line single-line comment \
       this is a /* a midline comment */ continuation of the comment
    
    /* a mutli lined comment
    	which doesnt end till here */
    
    char ch = '\\';
    const char *str = "\" \
                       blah";
    const char *str2 = "\"", str3 = "\""; // and this is another comment
    
    /*/ there is stuff in between here /*/
    /*/stuff inbetween here as well/*/
    /*//*/
    /*/ /*/
    /* "a comment within a quote" */
    
    /* another comment */
    
    char c = '\'';
    char c1 = '\'\'\'\'\'\'\\\\';
    char c1 = '\'\'\'\'\'\'\\';
    yes i knew some of that code not standard, or even compile.
    but i wanted to test it on the werid stuff that could coem up.

  15. #45
    *this
    Join Date
    Mar 2005
    Posts
    498
    And how many lines of code is yours? mines totaling about 500 and it works liek a charm, just have to get the keywords function coded and im all done.

    also a couple things that dev and my other compiler do:
    Code:
    "\" \
                       blah";
    the second line "blah";" would not be red.

    and...
    Code:
    #include<iostream>
    I personally like it when the whole line is blue atleast thats what my compilers do except vs .net 2003

Page 3 of 4 FirstFirst 1234 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Katrina Aftermath: Woeful Incompetence (rant).
    By anonytmouse in forum A Brief History of Cprogramming.com
    Replies: 61
    Last Post: 09-05-2005, 07:39 AM
  2. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  3. February 1, 2019...
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 98
    Last Post: 08-03-2002, 07:24 AM
  4. Religious Bull****
    By Witch_King in forum A Brief History of Cprogramming.com
    Replies: 119
    Last Post: 10-23-2001, 07:14 AM
  5. IT people - weird genius or simply narrow-minded, antisocial, lazy people
    By Carlos in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 10-11-2001, 05:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21