Thread: SELECT statement

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    17

    SELECT statement

    Can anyone point me in the direction of some documentation for the 'select' statement in C. Checked my reference books and google but can't find anything. Cheers!

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    I don't believe I've ever seen a select statement in C. While the absence of evidence is not in and of itself evidence, are you sure there IS a select statement in C? If so, where did you hear about it?

  3. #3
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    select statement? Perhaps you could give some context of what you are referring to with a little snippet of code..?
    Last edited by kermit; 09-11-2004 at 10:24 AM.

  4. #4
    Registered User
    Join Date
    Mar 2004
    Posts
    17
    OK, I posted a question about serial port programming on www.linuxforum.com/forums. They suggested the use of ther select statement for something I want to do.

    Code:
    select(fd+1, &rdfs, NULL, NULL, &tv);
    I managed to compile the example he gave in gcc under fedore core 2 so it must exist. Would just like to understand it before I proceed any further. Thanks.

  5. #5
    ---
    Join Date
    May 2004
    Posts
    1,379
    i still got no idea what you mean.
    where is this select function from and what does it do?

  6. #6
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    There is no such function in standard C. You can either post the example code they gave you and we'd be able to see if it's a user defined function or some other API and send you in the right direction. Do you know C?

  7. #7
    Registered User
    Join Date
    Mar 2004
    Posts
    17
    Yes I know C. This is not a user defined function and it compiles under gcc / I thought gcc was pretty much standard c but maybe it's specific to it. The select statement is used to wait for data to be available on the serial port and to set a timeout. That's as much information as I can provide on it. Thanks.

  8. #8
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    did you try 'man select'?

  9. #9
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    In case you don't already have these resources:
    Serial HOWTO
    Serial Programming HOWTO
    Modem-HOWTO

    SELECT(2)

    gg

  10. #10
    Registered User
    Join Date
    Mar 2004
    Posts
    17
    Thanks, didn't think to do a man select!! yes have the serial resources. Thanks to all!

  11. #11
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. mysql select statement
    By Stabbsy in forum C Programming
    Replies: 3
    Last Post: 08-17-2007, 11:06 AM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM