Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-10

Just wondering about incrementing integer values....

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to samps okholm
samps okholm wrote 9 lines
Why is radiogroup1.ItemIndex:=radiogroup1.ItemIndex+1; working but inc(radiogroup1.itemindex); ? //unit1.pas(36,71) Error: Can't take the address of constant expressions is not?

Because itemindex is a property, not a variable. Inc() needs a variable.

Michael.

Reply by email

samps okholm
to Michael Van Canneyt

Thanks. Makes sense now you put it so concisely...

:-)
Samps

On Fri, Oct 18, 2013 at 7:49 PM, Michael Van Canneyt <

Show quoted text 28 lines
wrote: On Fri, 18 Oct 2013, samps okholm wrote: Why is > radiogroup1.ItemIndex:=**radiogroup1.ItemIndex+1; > > working but > > inc(radiogroup1.itemindex); //unit1.pas(36,71) Error: Can't take the > address of constant expressions > > > is not? > Because itemindex is a property, not a variable. Inc() needs a variable. Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131018/40e54565/attachment.html>

Reply by email