-Up to-Home/Products/Irk
-Site Map|-Text version

- Irk - Notes

[Restrictions] [Line Continuations - synopsis] [Preprocessor Directives - synopsis] [Line Continuations - details] [Preprocessor Directives - details] [K&R-style parameter declarations]


Restrictions

Line Continuations - synopsis

Line Continuations - more detail

Preprocessor Directives - synopsis

Preprocessor Directives - more detail:


Line Continuations - details

Preprocessor Directives - details

Examples of things which won't workExamples of things which will work
#define openParen (
#define closeParen )

// No apparent match for open-parenthesis after 'bar'
void bar ( closeParen {
}

// Not recognised as a function
void foo openParen closeParen {
}
#ifdef foo
  int bar(int a, int b)
#else
  double bar(double a, double b)
#endif
  {
    return 0;
  }
//  This example is very contrived. Both the
//  "won't work" and "will work" versions are
//  ugly and verge on the unreadable

void foo() {
#ifdef PLATFORM1
  if (platform1_specific_cond) {
#else
 
// some other code without a {
#endif

  call_some_func();

#ifdef PLATFORM1
  }
#else
 
// some other code without a }
#endif
}
//  This example is very contrived. Both the
//  "won't work" and "will work" versions are
//  ugly and verge on the unreadable

void foo() {
#ifdef PLATFORM1
  if (platform1_specific_cond) {
#else
 
// some other code
  {
#endif

  call_some_func();

#ifdef PLATFORM1
  }
#else
 
// some other code
  }
#endif
}

K&R-style parameter declarations

K&R-style parameter declarations aren't supported because


-This page
last changed:
17 Sep 1999
[Validate HTML]
-Donate free
food & land
 
-
|Feedback by email
or Web form