Re: [fpc-pascal]Re: CGI
On Tue, Jan 28, 2003 at 08:07:26AM -0500, Luis Del Aguila wrote: > But, The User's Guide, chapter 11, don´t to explain how write a program > that send the Form Content for e-mail. How to send eMail from a program? Well, I don't know, if there is a Unit for it. On Unix systems, there is mostly the program "mailx", which can be used as backend. Read the Manpage. You can use it with the command "POpen" from the Linux-Unit. -- Tschuess Andreas ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Destroy Instance
> Luis Del Aguila schrieb: > > > b.destroy; //if destroy the instance . > > Writeln(b.campo2); // Why the instance exist? > > You have to call b.Free instead of b.Destroy to properly destruct the > instance. > Free automatically calls the destructor if the object reference is not nil. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]CGI
¿ How to make a CGI program in pascal, that read and send for e-mail the Html form content ? Look at the User's Guide, chapter 11. There's also an unCGI Unit around. HTH Tschuess Andreas Pero, La guia de usuario, capitulo 11, no explica como escribir un programa que envie el contenido de un formulario por correo elctrónico. Alguien puede ayudarme. Gracias But, The User's Guide, chapter 11, don´t to explain how write a program that send the Form Content for e-mail. Any body help me. Thanks ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]Free Instance
I don't Understand, I compile this code with FPC 1.06 for Windows and the directive compiler -S2 -Rintel. is it a bug?. Thanks Type TClase1 = Class campo1:string; End; TClase2 = Class (TClase1) campo2:string; End; Var b:Tclase2; Begin b:=TClase2.create; b.campo1:='hola'; b.campo2:='hola2'; Writeln(b.campo2); b.free; //if free the instance . Writeln(b.campo2); // Why the instance exist? Write('presione enter para terminar');readln End. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Free Instance
> I don't Understand, I compile this code with FPC 1.06 for Windows and the > directive compiler -S2 -Rintel. > is it a bug?. > > Thanks > > > Type >TClase1 = Class > campo1:string; >End; >TClase2 = Class (TClase1) > campo2:string; >End; > > Var b:Tclase2; > Begin >b:=TClase2.create; >b.campo1:='hola'; >b.campo2:='hola2'; >Writeln(b.campo2); >b.free; //if free the instance . >Writeln(b.campo2); // Why the instance exist? >Write('presione enter para terminar');readln > End. Because the memory is released (iow it can be used for the next allocation), but the data is not erased (e.g. filled with zeroes), and the pointer still points to the data. (but that is dangerous, since after the free it _can_ be overwritten) Use freeandnil(b); to also set it the pointer to NIL. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Run Time Error codes
At 19:56 28/01/2003 +0100, you wrote: On zaterdag, jan 25, 2003, at 02:34 Europe/Brussels, Eduardo Morras wrote: Does anyone knows what means the next error codes: 998, 313. And where find information about the applications exit code? Such strange error codes are error codes that come straight from the operating system and which are for some reason not properly translated by the RTL. If you say which routines cause such errors, we an have a look at them. Jonas Well, i rewrote some parts of the app, and have no backup copies, but the 998 error dissapear when i rewrote the second BlockRead call in: {OLD} procedure LeerFrame(leidos : longint); Type Tdummy = array[1..8] of byte; var dummy : ^Tdummy; begin GetMem(dummy,sizeof(Tdummy)); leidos := 0; BlockRead(FileIN,FrameRGB,CIFW*CIFH*3,leidos); LeerFrameOK := TRUE; BlockRead(FileIN,dummy,8); {THIS ONE} FreeMem(dummy,sizeof(Tdummy)); end; {NEW} procedure LeerFrame(leidos : longint); var a,b : longint; begin leidos := 0; BlockRead(FileIN,FrameRGB,CIFW*CIFH*3,leidos); if leidos=(CIFW*CIFH*3) then begin BlockRead(FileIN,a,4); BlockRead(FileIN,b,4); LeerFrameOK := TRUE; end; end; The BlockRead doesn´t need a 4th var because it's for padding. But it gets an error on the first read, when i have near 7000. So, i can find the error codes in win32API help? ATIA P.S. The file is an RGB AVI uncompressed, between frames are 8 bytes. - #The Unix Guru's View of Sex unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ; umount ; sleep ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Run Time Error codes
At 17:51 29/01/2003 +0100, you wrote: At 19:56 28/01/2003 +0100, you wrote: On zaterdag, jan 25, 2003, at 02:34 Europe/Brussels, Eduardo Morras wrote: Does anyone knows what means the next error codes: 998, 313. And where find information about the applications exit code? Such strange error codes are error codes that come straight from the operating system and which are for some reason not properly translated by the RTL. If you say which routines cause such errors, we an have a look at them. Jonas Well, i rewrote some parts of the app, and have no backup copies, but the 998 error dissapear when i rewrote the second BlockRead call in: Well, with the changes i get an error 147, but this i know what is. In the BlockRead, there is not enough room at the buffer var for the number of records readed. So, i must retype my buffer to be 1 byte greater. My buffer was from [1..last-1], so 1 byte lesser than i need, and changeing it to [0..last-1] do all work well. Thanks a lot to all. - La diferencia entre la teoria y la practica es que en teoria no hay, pero en la practica si ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Free Instance
* Luis Del Aguila [LDA] [Wednesday, January 29, 2003] wrote: * subject: [fpc-pascal]Free Instance * msgid:000101c2c786$cdb45d90$1d1e30c8@mesajil [...] LDA>Writeln(b.campo2); LDA>b.free;//if free the instance . // replace b.free with: FreeAndNil (b) ; If Assigned (b) Then LDA>Writeln(b.campo2); // Why the instance exist? LDA>Write('presione enter para terminar');readln LDA> End. 8o) * Best regards ... -- ` _ , ' :: Linux Registered User [#168882] - (o)o) - :: The-Bat! 1.63 Beta/5 -ooO'(_)--Ooo :: Weakened by Windows 98/4.10. A - Don't waste your idle time, Donate it! [www.distributed.net] >000101c2c786$cdb45d90$1d1e30c8@mesajil">mid:000101c2c786$cdb45d90$1d1e30c8@mesajil ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal