|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hello, me agian Bubblez101
I got an error that i never seen before. knowing what it actually means would be a great help. This is the error: Operator not applicable to this operand type here is the code that the error highlighted on: if not ch := LetterList then showmessage('You have used that letter already, choose another letter!'); LetterList.add := ch+LetterList; I have declared this after implementation: var Letter : array[1..26] of char; type LetterList = record Letter : char; Thanx in advance for any help. Agian. ![]() |
|
#2
|
|||
|
|||
|
"ch := LetterList" is a statement. It has no return value, so no operators can be applied to it. You are trying to use "NOT". This looks like you have some C or Java background... Delphi / Pascal doesn't support the C-Way of assignments where you get the assigned value as return value.
ch := LetterList; if NOT (ch<>0) err, nonsense: if ch=0 then... (the NOT operator in Delphi can only be applied to boolean expressions) hth, M.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Operator not applicable error, help would be awsome |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|