comparing two boolaen variables and insert new variable with true variable

Dear Experts

no := TRUE/false;
no1:= FALSE/true;
IF no<>no1 THEN
no12:=//here i want insert only  true boolean 

 

how i will insert true variable into no12

please dont think that silly question

 

 

thanks

DJ

  • no := TRUE;

    no1 := FALSE;
    If no<>no1 THEN
    no12 := no;

     

    or other way,

     

    no := FALSE;
    no1 := TRUE;
    If no<>no1 THEN
    no12 := no1;

    Is this what you need to achieve?

  • In reply to Harikiran BM:

    hello harikiran thanks for reply

    for "no" variable and "no1" variable some time its coming as true and some times its coming as false but we dont know perfect when it comes true and false .

    buy comparing both variables i want to insert third variable "no12" as true variable when both the variables are different.

    but in your example it saying "no" as true in one way and onother way "no" as false
    so you easily assign it ..but my scenario is we dont know when it come true and when it come false.

    i already wrote like this example but it shows length and it is not correct because if i have 30 fields then it go more and more
    here

    no as boolean
    no1 also boolean
    no12 as text
    no123 aslo text


    IF no<>no1 THEN BEGIN
    IF no THEN
    no12:='No'
    ELSE
    IF no1 THEN
    no123:='No';
    END;
    IF description<>description1 then BEGIN
    IF description THEN
    description12:='Description'
    ELSE
    IF description1 THEN
    description123:='Description';
    END;
    message(%1%2%3%4, no12,no123,description12,description123......)
    here i want to show only true variables when both the variables are different .....this one i want to achieve...please say any other method

    Thanks
    DJ
Related