Hi All.
I'm is proffessional in C/C++, but I newbie in PASCAL (PPC). I have some questions about using pointers.
1. Addressing arithmetic. In C: int* buffer = ... * (buffer + 1) = 10;
2. Converting pointers to Integer and over In C: int *ptr = ... int val = ... val = (int) ptr; ptr = (int*) val
3. NIL and procedure type I save pointer to procedure in variable. Can I test this variable: TYPE Proc = PROCEDURE; VAR Ptr: Proc; Ptr = SomeProcedure; IF(NIL = Ptr) // not compiled IF(NIL = Ptr^) // not compiled IF(NIL = @Ptr) // compiled, but always FALSE, because @Ptr - address of variable (or not)
ps. Sorry for me english. pps. Inserting code not working in my browser (Opera 10.5) |