Thema: Delphi array of pointers

Einzelnen Beitrag anzeigen

Benutzerbild von JasonDX
JasonDX
(CodeLib-Manager)

Registriert seit: 5. Aug 2004
Ort: München
1.062 Beiträge
 
#5

Re: array of pointers

  Alt 24. Jun 2006, 15:19
You have to dereference the Pointer. This usually works like this:
IntegerValue := PointerToInteger^ But, since you're not using typed Pointers, you have to tell, that this is an integer, so a simle cast is enaugh:
IntegerValue := Integer(Pointers[Step_input]^) btw, code is always easier to read, if you use typed Pointers (means: ^integer instead of Pointer), so if you intend to store only one Datatype in those Pointers, youse typed Pointers

greetz
Mike
Mike
Passion is no replacement for reason
  Mit Zitat antworten Zitat