I have the following code:
 - (void) setConstrainedTransform: (CGAffineTransform) aTransform
{
 imageView.transform = aTransform;
 CGAffineTransform concat;
 CGSize asize = imageView.frame.size;
 if(asize.width > MAXZOOM * originalSize.width)
 {
 concat = CGAffineTransformConcat(imageView.transform, CGAffineTransformMakeScale((MAXZOOM * originalSize.width / asize.width), 1.0f));
 imageView.transform = concat;
 }
}
where MAXZOOM is defined as 2.0f. 
The problem is, it shows the following error:
Expected ')' before ';' token;
I tried everything I could think of to solve it, but could not succeeded. Does anyone know what could be causing this error and how I could fix it?
 asked Jan 14, 2011 at 10:05
 
 
 
 RAMAN RANA 
 
 1,7855 gold badges21 silver badges40 bronze badges
 
 - 
 1Please use the code tagsAerus– Aerus2011年01月14日 10:06:28 +00:00Commented Jan 14, 2011 at 10:06
- 
 what u mean by code tagsRAMAN RANA– RAMAN RANA2011年01月14日 10:07:59 +00:00Commented Jan 14, 2011 at 10:07
- 
 He means the button at the top of the editing field with curly braces. You can highlight all of your code, then click that button. It will make the code show up properly formatted. I already fixed this post, but now you'll know in the future.Cody Gray– Cody Gray ♦2011年01月14日 10:10:54 +00:00Commented Jan 14, 2011 at 10:10
- 
 Please put the define in the code snippet, too and also tell us where the error is reported (which line).Daniel Schneller– Daniel Schneller2011年01月14日 10:12:22 +00:00Commented Jan 14, 2011 at 10:12
- 
 Have a look for errors on you #import files.Abizern– Abizern2011年01月14日 10:13:35 +00:00Commented Jan 14, 2011 at 10:13
2 Answers 2
Maybe you have defined the macro with a trailing semicolon?
// v
#define MAXZOOM 2.0f;
If so, remove that and see if the issue persists.
 answered Jan 14, 2011 at 10:13
 
 
 
 martin clayton 
 
 78.6k33 gold badges220 silver badges201 bronze badges
 
 
 Sign up to request clarification or add additional context in comments.
 
 
 
 Comments
Just assuming: did you put a ; at the end of the #define ?
Remove that, it will be put where you use MAXZOOM. 
So instead of
#define MAXZOOM 2.0f;
make it
#define MAXZOOM 2.0f
 answered Jan 14, 2011 at 10:14
 
 
 
 Daniel Schneller 
 
 14k5 gold badges46 silver badges72 bronze badges
 
 Comments
lang-objectivec