dimanche 21 août 2016

How to use if statements to display an output if a 0 has been entered in a SpinEdit control lazarus

There are 3 SpinEdit controls called Breakfast,Lunch and Dinner. I'm trying to use nested if statements to display a warning output when any of these SpinEdit values = 0.

if i use:

if sedBreakfast.value := 0 then

lstReport.Items.Add('Be careful not to skip another meal');

It gives me: unit1.pas(84,18) Error: Incompatible types: got "untyped" expected "Boolean"

When i use:

if sedBreakfast.value := '0' then

lstReport.Items.Add('Be careful not to skip another meal');

It gives me: unit1.pas(84,32) Error: Incompatible type for arg no. 1: Got "Char", expected "Double"

So my question is How would i fix this code or how do i convert char to double like it wants me to.

Aucun commentaire:

Enregistrer un commentaire