Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
April 22, 2018, 09:12:52 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: Chapter 12 exercises 2 - 7  (Read 1663 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:  

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 ゥ 2009 classroomM.com. All rights reserved.