|
|
| User: "Paweł" |
|
| Title: Re: compile error :( |
14 Jul 2003 03:36:03 AM |
|
|
Note that "__fastcall" is not standard C++.
{
if((Key < '0') (Key > '9') Key = '#0';
1. You need an operator between the two expressions.
Probably you meant "||".
yes, but i tried word " or " and there was an compile error
2. Specifying more than one character between apostrophes
like in '#0' is an old C syntax for "magic" integer
values, but there isn't room in a char for that value.
Probably you meant something else. Like '\0'.
U R right.
}
Why? I need to filter alloed key do digits only.
Have you considered 'isdigit'?
This helped. Thx.
Pawel
.
|
|
|
| User: "Victor Bazarov" |
|
| Title: Re: compile error :( |
14 Jul 2003 09:43:25 AM |
|
|
"Jeremy Cowles" <jeremy.stop-spam-now.cowles@asifl.com> wrote...
"Paweł" <koral21@poczta.onet.pl> wrote in message
news:betq1f$mqc$1@news.onet.pl...
Note that "__fastcall" is not standard C++.
{
if((Key < '0') (Key > '9') Key = '#0';
There is a missing closing parenthesis after '9'.
1. You need an operator between the two expressions.
Probably you meant "||".
yes, but i tried word " or " and there was an compile error
AFAIK, keyword "Or" is not valid in C++ as a boolean operator (or any
other
operator for that matter).
You know wrong. "or", "and", "xor", "not" "not_eq", "and_eq",
"compl", "bitor", "bitand", "xor_eq", "or_eq", are reserved as
_alternative_ tokens for "||", "&&" , "^", "!", "!=", "&=",
"~", "|", "&", "^=", "|=", respectively.
If a compiler does not accept those, it's non-compliant.
Victor
.
|
|
|
| User: "Jeremy Cowles" |
|
| Title: Re: compile error :( |
14 Jul 2003 10:40:57 AM |
|
|
"Victor Bazarov" <v.Abazarov@attAbi.com> wrote in message
news:vh5gdlqd4pmif2@corp.supernews.com...
"Jeremy Cowles" <jeremy.stop-spam-now.cowles@asifl.com> wrote...
"Paweł" <koral21@poczta.onet.pl> wrote in message
news:betq1f$mqc$1@news.onet.pl...
[snip]
yes, but i tried word " or " and there was an compile error
AFAIK, keyword "Or" is not valid in C++ as a boolean operator (or any
other
operator for that matter).
You know wrong. "or", "and", "xor", "not" "not_eq", "and_eq",
"compl", "bitor", "bitand", "xor_eq", "or_eq", are reserved as
_alternative_ tokens for "||", "&&" , "^", "!", "!=", "&=",
"~", "|", "&", "^=", "|=", respectively.
If a compiler does not accept those, it's non-compliant.
My fault (newb). Wierd that these were not mentioned in my book, or perhaps
they were & I just missed them.
Jeremy
.
|
|
|
|
|
| User: "Alf P. Steinbach" |
|
| Title: Re: compile error :( |
14 Jul 2003 03:41:17 AM |
|
|
On Mon, 14 Jul 2003 10:36:03 +0200, "Paweł" <koral21@poczta.onet.pl> wrote:
Note that "__fastcall" is not standard C++.
{
if((Key < '0') (Key > '9') Key = '#0';
1. You need an operator between the two expressions.
Probably you meant "||".
yes, but i tried word " or " and there was an compile error
2. Specifying more than one character between apostrophes
like in '#0' is an old C syntax for "magic" integer
values, but there isn't room in a char for that value.
Probably you meant something else. Like '\0'.
U R right.
}
Why? I need to filter alloed key do digits only.
Have you considered 'isdigit'?
This helped. Thx.
You're welcome. Aside from C++ programming, the most common
error/oversight in doing what you're attempting is to forget
about _pasting_ of text into the control... Just a hint.
.
|
|
|
|
|