Operand type is incompatible with operator


Noppadet

i get error

Operand type is incompatible with operator

Click OK in the header when trying to compare two "real" data types.

Can anyone help me with what problem?

public void clicked()
{
    real    localAnnualUsage    = itemSetup_DS.AnnualUsage();
    real    localSalesPrice     = itemSetup.StockPrice;
    real    localCost           = itemSetup.StockCost;
    real    localstockInventAvg = itemSetup.StockInventAvg;

    real    localTurnAndEarn;
    real    localAnnualGP;
    real    localAvgInvCost;
    ;

    localAvgInvCost = itemSetup.StockInventAvg;

    if (localStockInventAvg != itemSetup_StockInventAvg)
    {
        localAvgInvCost = itemSetup_StockInventAvg;
    }

    //...
}

The error occurred on a conditional line.

Jan B. Kjeldsen

Most likely your itemSetup_StockInventAvgvariable is the actual control , not the actual control .

Try using:

if (localStockInventAvg != itemSetup_StockInventAvg.realValue())

or better (because the control stores the result in itemSetup.StockInventAvg):

if (localStockInventAvg != itemSetup.StockInventAvg)

UPDATE: This doesn't make sense since it localStockInventAvg's set to the itemSetup.StockInventAvgprevious line.

Related


Operand type is incompatible with operator

Noppadet i get error Operand type is incompatible with operator Click OK in the header when trying to compare two "real" data types. Can anyone help me with what problem? public void clicked() { real localAnnualUsage = itemSetup_DS.AnnualUsage();

operator operand type mismatch

it tolman kray I have this code snippet fun decrement_to_zero r = if !r < 0 then r := 0 else while !r >= 0 do r := !r - 1 from this tutorial https://learnxinyminutes.com/docs/standard-ml/ But I get this erro

operator operand type mismatch

it tolman kray I have this code snippet fun decrement_to_zero r = if !r < 0 then r := 0 else while !r >= 0 do r := !r - 1 from this tutorial https://learnxinyminutes.com/docs/standard-ml/ But I get this erro

Operand type conflict: bigint is incompatible with time

Red Bull I am using time datatype for a column in a table in SQL Server. I'm working in a WPF project and we use nhibernate in the service layer for all database operations. Use entity developer-generated domain classes, dto classes. The time column has been c

Operand type conflict: bigint is incompatible with time

Red Bull I am using time datatype for a column in a table in SQL Server. I'm working in a WPF project and we use nhibernate in the service layer for all database operations. Use entity developer-generated domain classes, dto classes. The time column has been c

wrong operand type for binary operator '%'

Tilak Maddy: I am trying to code in Java 8 way: public static void main (String[] args) throws java.lang.Exception { int arr [] = {3,4,5,6,7}; Arrays.asList(arr) .stream() .filter(i -> i % 2) .sorted() .map(j -

wrong operand type for binary operator '%'

Tilak Maddy: I am trying to code in Java 8 way: public static void main (String[] args) throws java.lang.Exception { int arr [] = {3,4,5,6,7}; Arrays.asList(arr) .stream() .filter(i -> i % 2) .sorted() .map(j -

wrong operand type for binary operator '^'

Anthony D: Try creating a recursive method that doubles the int power of the java class. The instruction says: "However, write the code so that when n is even, the method will return (x^(n/2))^2." This is what I have so far: public static double powerFast

wrong operand type for binary operator '^'

Anthony D: Try creating a recursive method that doubles the int power of the java class. The instruction says: "However, write the code so that when n is even, the method will return (x^(n/2))^2." This is what I have so far: public static double powerFast

wrong operand type for binary operator &

Ritu Raj Shrivastava I'm trying to use the bitwise & operator to print an even number and then an odd number, but no idea why it doesn't work with the ternary operator. class Geeks { static void evenOdd (int a,int b) { int e = (a&1==0)?a:b;// e

wrong operand type for binary operator '<='

umair saifullah class First { public static void main(String[] arguments) { int x =60; if (51 <= x <= 9) { System.out.println("Let's do something using Java technology."); } else { System.out.println("Let's");

wrong operand type for binary operator +

RubyDigger19 I need a number up to 20 digits and I'm using bigint. It gives me this error (wrong operand type for binary operator +) in the line below. BigInteger t = new BigInteger(my_number.getText().toString()); my_number.setText(String.valu

operator is not available for this operand type Delphi

Edin Hadjerevich Please someone help me with this error. [error] Unit1.pas(39): operator not applicable to this operand type The code is: procedure TForm1.Button1Click(Sender: TObject); var k: Integer; broj: Real; begin k := StrToInt(Edit1.Text); if k

operator is not available for this operand type Delphi

Edin Hadjerevich Please someone help me with this error. [error] Unit1.pas(39): operator not applicable to this operand type The code is: procedure TForm1.Button1Click(Sender: TObject); var k: Integer; broj: Real; begin k := StrToInt(Edit1.Text); if k

wrong operand type for binary operator &

Ritu Raj Shrivastava I'm trying to use the bitwise & operator to print an even number and then an odd number, but no idea why it doesn't work with the ternary operator. class Geeks { static void evenOdd (int a,int b) { int e = (a&1==0)?a:b;// e

Wrong type of operand for binary operator

nutlocks I am writing a program (here is a part of it): for (int a = 0; a<=firstsplit.length-1; a++) { //skipping over values that say how many pieces are on board for (int i = 3; i <= 12; i++) { //compatible with piece numbers up to 12(m