![]() |
syntax prob
inkompatible typen sagt er, ich hab markiert wo der cursor stehen bleibt
image_num := strtoint (image_name2);
Delphi-Quellcode:
if image_num <> 1 and image_num <> 16 and image_num <>//hier bleibt cursor stehen
31 and image_num <> 46 and image_num <> 61 and image_num <> 76 and image_num <> 91 and image_num <> 106 and image_num <> 121 and image_num <> 136 and image_num <> 151 and image_num <> 166 and image_num <> 181 and image_num <> 196 and image_num <> 211 and image_num <> 226 and image_num <> 241 then begin |
Re: syntax prob
AND hat eine höhere Bindung. Darum klammern setzten.
Delphi-Quellcode:
if (image_num <> 1) and (image_num <> 16) and (image_num <> 31).....
|
Re: syntax prob
Klammer??? Oder
if not in [6,21,61...] Edit: Tjy, da war der Hai schneller. :( |
Re: syntax prob
kannst du vielleicht etwas genauer zeigen wie man "if not in" benutzt? hab immer gedacht man müste immer alles ausschreiebn bei if sachen
|
Re: syntax prob
Zitat:
in diesem Fall ist es eine "Mengenoperation" und darum geht es.
Delphi-Quellcode:
[Edit]Erster :P :bounce1: :bounce2: :bounce1:
begin
if not (image_num IN 6,21,61...]) then begin end; end; [Edit2] Aber himitsu hat ja auch alle zahlen getippt ;-) |
Re: syntax prob
nein, man kann auch eine Menge benutzen. Sieht dann so aus:
Delphi-Quellcode:
TOX
if not (a in [1,2,3]) then dosomething;
Edit: Also langsam find ich das echt nicht mehr lustig :evil: |
Re: syntax prob
Delphi-Quellcode:
if not (image_num in [1, 16, 31, 46, 61, 76, 91, 106, 121, 136, 151, 166, 181, 196, 211, 226, 241]
then begin [edit] och menno, zu langsam -.- |
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:01 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz