[fpc-pascal] Turbo Pascal Mode Bug?

2007-10-01 Thread Zaka E-Lab
Hello, I have a peace of code that demonstrates that in the TP mode of freepascal, one can use a function as a procedure. Is this a bug or a normal behavior? My University have replaced ( other time ) freepascal.org, and we must use the archaic Turbo Pascal 6.0, cause they say that freepascal d

Re: [fpc-pascal] Turbo Pascal Mode Bug?

2007-10-01 Thread Zaka E-Lab
Daniël Mantione: Funny. Free Pascal does not respect ISO Pascal, because it respects Turbo Pascal. :) Turbo Pascal in turn, does not respect ISO Pascal, because it respects UCSD Pascal. Is very confusing when talking about Standard Pascal, cause it's not like C/C++ that have standard that is

[fpc-pascal] Turbo Pascal mode!!

2008-01-16 Thread Zaka E-Lab
Some time ago, I posted about this. On the TP mode FreePascal can use a function as a procedure. Florian told me that that was because of the version of the TP emulation. Well, after that, I was happy with that until now. I discovered that, even adding {$x-} to the code, if you put a function ins

[fpc-pascal] Pointers in Pascal!!

2008-04-29 Thread Zaka E-Lab
I have something like this: PStruct = ^Struct; Struct = record num: integer; end; I have a unit to handle that structure ( is a bit more complicated, but is a good example), in this unit I have a procedure that deletes ( disposes ) the pointer. How can I know if a pointer a

Re: [fpc-pascal] Pointers in Pascal!!

2008-04-29 Thread Zaka E-Lab
Maybe I haven't explain it correctly. What I want is to construct a Unit that contains some procedures, one of them is create(var p : PStruct), and other is delete(var p : PStruct). I don't create anything, the memory is allocated by the create procedure. How can the procedure know if the argumen

Re: [fpc-pascal] Pointers in Pascal!!

2008-04-29 Thread Zaka E-Lab
It's possible to give a default initialization value to a defined type? I suppose that it isn't, but it would be to easy to resolve that trouble that way. Anyway, I appreciate your help and support. Thanks. Zaka. Jonas Maebe escribió: It cannot know that without help. You have to do such book