Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 10-10-2017, 07:50 AM
rmt rmt is offline
Senior Member
 
Join Date: Jun 2013
Posts: 247
Default Delphi5 :If condition

Dear Expert,

The following is the code being used in delphi5;

Quote:
showmessage(fState+Booltostr(vValidSaveTF)) ;//EFalse
if
(
((vValidSaveTF=true ) and (fState ='I')or(fState='E'))
)or(fState<>'I') or (fState<>'E')


then
begin showmessage('??');
fRefNo:='';
fbatchno:='';
if cdsBatchTrn.Active then
cdsBatchTrn.Active:=False;
end;
The first showmessage() above shows EFalse i.e fState='E' and vValidSaveTF=False. But it meets the condition and shows second showmessage() i.e '??'. Kindly suggest what is wrong with the IF Statement.

Regards,
__________________
Rmt
Reply With Quote
  #2  
Old 10-10-2017, 08:25 AM
rmt rmt is offline
Senior Member
 
Join Date: Jun 2013
Posts: 247
Default

Please ignore this thread.
__________________
Rmt
Reply With Quote
  #3  
Old 10-10-2017, 09:32 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,203
Default

lol, found out the mistake in the last fState<> compares?

Happens to anybody, but then you know it's time to find the coffee machine ;-)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 02:42 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.