Board index » delphi » could someone tell me why this doesn't work (short code example)
Robert Stephan
![]() Delphi Developer |
Fri, 15 Oct 1999 03:00:00 GMT
|
Robert Stephan
![]() Delphi Developer |
Fri, 15 Oct 1999 03:00:00 GMT
could someone tell me why this doesn't work (short code example)QuoteRene Veerman wrote: Quote
Hi Rene, you need to insert the unit SYSTEM in the uses statement. Hope this helps, ======================================================= At least my life isn't object orientated... |
Jim O'Bri
![]() Delphi Developer |
Fri, 15 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)QuoteIn article <3365bce8.7042...@news.xs4all.nl>, lowle...@xs4all.nl (Rene Veerman) wrote: Jim. _______________________________________________________________________ |
skin
![]() Delphi Developer |
Fri, 15 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)Quote> params:='r'; probably do it. You should use the ParamCount function to return the number of parameters on the command line.. for i := 2 to ParamCount do brian, People used to play with toys, now the toys play with them. |
David Ullric
![]() Delphi Developer |
Fri, 15 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)QuoteRene Veerman wrote: call paramstr(index) for some integer value of index. If index is larger than ParamCount you'll get a GPF - are you checking that first? -- ?his ?s ?avid ?llrich's ?ig ?ile |
Peter N Rot
![]() Delphi Developer |
Fri, 15 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)Rene Veerman <lowle...@xs4all.nl> wrote in article Quote
I tried to retrieve 9 parameters when there were in fact none. Each was returned as an emptry string. There should be no difference in behavior with any of Quote> But instead, it just generates an accessviolation and crashes the -- Grace + Peace * Peter N Roth * Engineering Objects International Author of "C++ Jump Start" ISBN 0-9655862-2-7. Tools for Developers: ClassBuilder 4 for Delphi, ClassBuilder++ for C++ Visit our website at http://www.inconresearch.com/eoi |
ed yama
![]() Delphi Developer |
Fri, 15 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)On Tue, 29 Apr 1997 09:21:48 GMT, lowle...@xs4all.nl (Rene Veerman) Quote>this code fails on using the function paramstr. I'd like to know why. Quote> params:='r'; OK, this may sound stupid, but are there 9 command line parameters? If if (ParamCount <> 9) or (ParamStr(1)[1] <> '/') then params := ''; The above code assumes 9 parameters. If you can process *up to* 9 var max := ParamCount; if (max = 0) or (max > 9) or (ParamStr(1)[1] <> '/') then params := ''; Hope this helps. ed yamada |
Peter N Rot
![]() Delphi Developer |
Fri, 15 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)Rene Veerman <lowle...@xs4all.nl> wrote in article Quote
I ran what I thought was the important part of the code without problem. Which invocation of paramstr() are you having trouble with (there are Is there something in procs.pas that trumps system.paramstr()? |
Rene Veerm
![]() Delphi Developer |
Sat, 16 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)this code fails on using the function paramstr. I'd like to know why. program project; uses forms, type const var params:='r'; if paramstr(1)[1]<>'/' then begin for cmd:=low (cmd) to high (cmd) do writeln (ord(cmd)); reg:=tRegistry.create; end. |
Rene Veerm
![]() Delphi Developer |
Sat, 16 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)On Mon, 28 Apr 1997 13:42:11 +0200, Robert Stephan <cl...@ns.noell.de> Quote>Rene Veerman wrote: get an "identifier redeclared" error. |
Rene Veerm
![]() Delphi Developer |
Sat, 16 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)On Mon, 28 Apr 1997 13:42:11 +0200, Robert Stephan <cl...@ns.noell.de> Quote>Rene Veerman wrote: generates an eAccessviolation of some sort. This occurs the moment you try to execute a line which uses paramstr()... |
Rene Veerm
![]() Delphi Developer |
Sat, 16 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)On Mon, 28 Apr 97 13:28:12 GMT, james.obr...@pobox.com (Jim O'Brien) Quote
|
Rene Veerm
![]() Delphi Developer |
Sat, 16 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)On Tue, 29 Apr 1997 09:21:48 GMT, lowle...@xs4all.nl (Rene Veerman) Quote>this code fails on using the function paramstr. I'd like to know why. like to thank the responders anyway :) The problem was that a borland exe crashes when you try to retrieve |
David Ullric
![]() Delphi Developer |
Sat, 16 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)QuoteRene Veerman wrote: it looks to me like they were right - I have no problem with ParamStr(999). Maybe the problem's elsewhere (or maybe it's different in different versions of Delphi)? -- ?his ?s ?avid ?llrich's ?ig ?ile |
Svante Granqvis
![]() Delphi Developer |
Sat, 16 Oct 1999 03:00:00 GMT
Re:could someone tell me why this doesn't work (short code example)QuoteDavid Ullrich wrote: At least for me, D2, Win95. This works both with and without huge strings enabled. -- |
1. VersionInfo - why doesn't this code work!?
2. Why doesn't this code work right?
3. Copy Folder function, why doesn't it work right?(Code incl)
4. Why Doesn't This PaintBox Code Work?
5. Why doesn't someone write a driver for MDB
6. why filecopy(string,'test.txt',err) doesn't work
7. COM works, but can't get DCOM to work on september Delphi Informant example code
8. Why this code don't work - I Found Why, Thanks