Re: code problem


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]

Posted by Erik on October 03, 2001 at 15:17:48:

In Reply to: Re: code problem posted by Peter DePasquale on October 03, 2001 at 15:13:01:

: : : : Im getting an error with: if (Type = 'P')
: : : : LENGTH = PEAKTIME;
: : : : where Type is a string, LENGTH is a string and PEAKTIME is an int. It says the condtional expression is illegal. Any suggestions on how to get the same if statement, yet legally?

: : : Yeah, recheck the difference between an expression and an assignment.

: : OK?

:
: OK, what? Did you note that you are attempting an assignment statement in your comparison expression?

You're going to need the comparison operator, not the assignment operator. You also might want to use Type as a char type instead of a string to neaten up your code.




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]