View previous topic :: View next topic
|
Author |
Message |
mflax
New User
Joined: 01 Sep 2006 Posts: 17 Location: Delhi
|
|
|
|
I have a alphanum field as x(4) and
i have a numeric field as 9(2) which have value as zero
if suppose, I moved numeirc to alphanumeirc then I compared alphanumeric like below
if alpha-numeirc = 0 then perform first else perform second.
where it'll go ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
It will not compile. you need to change your code from:
Code: |
If alpha-numeirc = 0 then perform first else perform second. |
to:
Code: |
If alpha-numeirc = '0000' then perform first else perform second. |
after coding properly, first will be performed. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Correction:
after the move of numeirc to alpha-numeirc, alpha-numeirc will contain '00bb' where b = space.
Unless you compare alpha-numeirc to '00' (or '00bb') second will be performed. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
It will not compile. you need to change your code from: |
I am not sure, if it throws a compilation error, Does it?... but expected execution wouldn't be achieved until compare that alphanum variable with a value with quotes.
So in your current coding situation, It'll always execute second until you modify it to '00bb' as suggested by Mr. Dick. |
|
Back to top |
|
|
kutty.r
New User
Joined: 22 Jun 2006 Posts: 24
|
|
|
|
hi,
you cant test the class of an field like is alpha-numeric.
the class test can be done only as follows
is numeric
is alphabetic
is alphabetic-higher
is alphabetic-lower
|
|
Back to top |
|
|
|