Amazon.com Widgets Chapter 12 exercises 2 - 7
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 18, 2013, 08:48:37 PM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Chapter Study
| | |-+  Chapter 12 - The Preprocessor
| | | |-+  Chapter 12 exercises 2 - 7
Pages: [1]   Go Down
Print
Author Topic: Chapter 12 exercises 2 - 7  (Read 459 times)
iseeumhmm
Newbie
*
Posts: 7






« on: November 06, 2011, 09:06:09 AM »

Here's the definitions I came up with:

Code: (Objective-C)
//
//  Chapter_12_header.h
//  Chapter_12_2
//
//  Created by Richard Heffren on 11-11-06.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#define _MIN(x,y) ( (x) < (y) ) ? x : y
#define MAX3(x,y,z) ((x)>(y) && (x)>(z) ? (x) : ((y) > (z) ? (y) : (z)))
#define IS_LOWER_CASE(x) ((x)>='a' && (x)<='z')
#define IS_UPPER_CASE(x) ((x)>='A' && (x)<='Z')
#define IS_ALPHABETIC(x) ( IS_LOWER_CASE(x) || IS_UPPER_CASE(x) )
#define IS_DIGIT(x) ( (x)>=0 && (x)<=9 || (x)>='0' && (x)<='9')
#define IS_SPECIAL(x) !( IS_ALPHABETIC(x) || IS_DIGIT(x) )
#define ABSOLUTE_VALUE(x) ((x) + 4) * (x)
« Last Edit: November 06, 2011, 09:08:38 AM by iseeumhmm » Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.