[fpc-pascal] A simple "exception handling" question

2006-01-28 Thread Bob Richards
I must not understand a fundamental concept here. Perhaps someone can point me in the right direction. {$mode Delphi} //Delphi or objfpc same results program hextest; // or why can't I trap an exception? uses Sysutils,strutils; var b:byte; hex:string; begin Write('Enter a hex Str

Re: [fpc-pascal] A simple "exception handling" question

2006-01-28 Thread Bob Richards
I probably should have stated which compiler I was using If it matters: $ fpc hextest.pas Free Pascal Compiler version 2.0.0 [2005/05/15] for i386 Copyright (c) 1993-2005 by Florian Klaempfl Target OS: Linux for i386 Compiling hextest.pas Linking hextest 26 Lines compiled, 0.6 sec -- PGP Enc

Re: [fpc-pascal] A simple "exception handling" question

2006-01-28 Thread Bob Richards
Michalis Kamburelis wrote: > There's a bug in Hex2Dec implementation -- it returns 0 instead of > raising EConvertError. Here's a patch: > > Index: strutils.pp > === > --- strutils.pp(wersja 2298) > +++ strutils.pp(kopia robo

Re: [fpc-pascal] A simple "exception handling" question

2006-01-29 Thread Bob Richards
Marco van de Voort wrote: > You are aware of the fact that the .o's belong to units too? > > Delphi .dcu = fpc .ppu + fpc .o ! Dumb me! Nope! And this was the problem. I just copied the new strutils.ppu file into /usr/lib/fpc/... NOT the strutils.o as well. So when the executable got "linked"

Re: [fpc-pascal] A simple "exception handling" question

2006-01-29 Thread Bob Richards
L505 wrote: > And also, smartlinked units contain .A files in addition to .O and .PPU files This brings up another nagging question I have had. If I set SpartLinking ON, my executables are no smaller! Your reply here seems to suggest, that I do not have any of my units compiled with SmartLinking

Re: [fpc-pascal] A simple "exception handling" question

2006-01-29 Thread Bob Richards
L505 wrote: > > Which installation/ide are you using for FPC, just FP-IDE or commandline, or > Lazarus? Free Pascal Compiler version 2.0.0 [2005/05/15] for i386 I don't use an IDE, I simply use vi to edit source, and then "fpc sourcefile" to produce the executable. > > .A, .O, .ppu files and

[fpc-pascal] Interactive SHELL?

2006-02-15 Thread Bob Richards
Hi All: What I need to do is to shell out to another program [GNUpg] and allow the user to interact with it (enter a pass phrase). I have tried all the FpExec routines, the Shell routines etc. They ALL execute gpg correctly, with the proper command-line args, I see gpg's response on the c

Re: [fpc-pascal] Interactive SHELL?

2006-02-15 Thread Bob Richards
Marco van de Voort wrote: > > Do you use units or libraries that might put the terminal in raw mode? > Ncurses,crt, video? I am using "crt" for the readkey function in one of my procedures. No ncurses, no video. I am also smart-linking, so the only function compiled in from crt SHOULD be readk

Re: [fpc-pascal] Interactive SHELL?

2006-02-15 Thread Bob Richards
Jonas Maebe wrote: > > No, because the crt unit contains initialisation code, and > initialisation code of a unit is obviously always linked in and > executed. This initialisation code puts the terminal in raw mode... Thanks Jonas! That was the issue. So, I will just have to write my own readkey

Re: [fpc-pascal] Interactive SHELL?

2006-02-15 Thread Bob Richards
Marco van de Voort wrote: > Try, - for testing purposes - to remove crt and use more basic input > (readln), and see if it makes the problems disappear. Indeed! Problem gone! now to hide the user's typying from the screen. I was using readkey and echowing back a "*" during password input. I will

Re: [fpc-pascal] Interactive SHELL?

2006-02-16 Thread Bob Richards
A.J. Venter wrote: > Maybe not, depending on what OS you are working for, try using ncrt instead, > I > am pretty sure ncurses does NOT use raw mode so it may work. > Thanks for the reply A.J. What I ended up using, and which worked perfectly was GetKeyEvent, TranslateKeyEvent(), KeyEventToSt

[fpc-pascal] [Lazarus] Install from source on Linux Issue

2006-02-16 Thread Bob Richards
I am attempting to install Lazarus on my development Linux W/S I retrieved the sources via svn, and also by downloading the tar ball. I change into the top of the source tree, and gave the command "make clean all" as per the docs. Here is what happens: [EMAIL PROTECTED] trunk]$ make clean all Ma

Re: [fpc-pascal] [Lazarus] Install from source on Linux Issue

2006-02-16 Thread Bob Richards
Bob Richards wrote: Hm. well, this must be an issue with my fpc install! I went and got the new fpdocs via svn, did a "make html" and: [EMAIL PROTECTED] fpcdocs]$ make html Makefile:118: *** Compiler Free Pascal Compiler version 2.0.2 [2006/02/13] for i386 Copyright (c) 19

[fpc-pascal] WinSock

2006-03-15 Thread Bob Richards
Can someone point me to the documentation for the winsock unit? It doesn't appear to exist in the html docs, nor in the pdf doc either. A google search turned up nothing. The unit exists in the source tree, I have it installed, but where is the doc?? I have fpc-2.0.2 running on Linux, and have

[fpc-pascal] ParamStr(0) bug??

2006-04-24 Thread Bob Richards
I have written a program who's behavior depends on the name by which it has been invoked. This is not uncommon, for instance sendmail invoked as mailq behaves in a completely different way. Anyway, it all works as intended as long as I *copy* the executable to a different name. However, if I us

Re: [fpc-pascal] ParamStr(0) bug??

2006-04-24 Thread Bob Richards
John Coppens wrote: > You could try to access the environment variables - the '_' variable > contains the command used to start the program. Just tested it - it shows > the link. Thanks John! That works a charm. -- PGP Encrypted E-Mail Prefered Public Key at: http://www.tamara-b.org/~bob/pubkey

Re: [fpc-pascal] eof strangeness

2006-05-02 Thread Bob Richards
John Coppens wrote: > program testeof; > > begin > if eof then > writeln('EOF found') > else > writeln('No EOF found'); > end. > > This sample program doesn't return till is pressed. That's correct and reasonable. You are terminating your program after an EOL (ENTER), If you send

[fpc-pascal]CGI and inet Units

2003-09-16 Thread Bob Richards
Greetings all: I am new to this list, and have a question. I have searched the list archives for the answer, but found only dead links :-(( I went to the FPC site, and likewise found only dead links :-(( WHere can I find the units "cgi" "uncgi" and "inet" THey "used" to be under contrib on t

Re: [fpc-pascal]CGI and inet Units

2003-09-16 Thread Bob Richards
On Tue, 2003-09-16 at 15:47, [EMAIL PROTECTED] wrote: > On 16 Sep 2003, Bob Richards wrote: > The uncgi and inet units are distributed with FPC. > > Surprised you don't find any links, becayse the following definitely work: > http://www.freepascal.org/packa

[fpc-pascal] Questions on Documentation

2005-10-10 Thread Bob Richards
Hi All: I am new to this list, but not new to pascal programming. I have been writing pascal code since Turbo pascal Version 3.0. I have installed Free Pascal Ver. 2.0.0, running it on a Linux WorkStation, and am writing CGI apps which run on a Linux server. I love FPC! It keeps me honest, and

Re: [fpc-pascal] Questions on Documentation

2005-10-11 Thread Bob Richards
Tomas Hajny wrote: > I'd suggest to fill your comment as a "Wishlist" type > bug record for area "Documentation" in our bug repository, so it doesn't > get forgotten. Will do when I get a moment! This sort of reference is what I think is needed. > > My (simplified) categorization to get you sta

Re: [fpc-pascal] Questions on Documentation

2005-10-11 Thread Bob Richards
A list member wrote me a private email and enclosed a very useful Korn Shell script which he posted here on the list in the past; it produced this: http://www.tamara-b.org/users/bob/rtl_pf_index.html Document. With this, as well as Tomas' file added to the docs, I am now cooking! Thanks!! Bob