Weird syntax

This is a discussion on Weird syntax within the C Programming forums, part of the General Programming Boards category; I have read my professor base code. I'm not familiar with "p" in the context. Can someone explain me what ...

  1. #1
    Registered User
    Join Date
    Feb 2004
    Posts
    9

    Weird syntax

    I have read my professor base code. I'm not familiar with "p" in the context. Can someone explain me what "p" is?
    int function(p)
    int p;
    {
    return (anotherFunction (p));
    }

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,824
    An integer parameter, declared in K&R syntax (in other words, very old).

    Which, if the code is less than 20 years old is not a good sign that whoever is teaching you actually knows anything worth knowing.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 09:26 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 07:33 AM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM

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