>Anybody knows what's this error, it appears when I call a function, at the
>Begin instruction!, I use this funcion in a lot of programs without problems,
>any hit?
It is stack overflow. Increase the stacksize
in the ProjectOptions.Link page, or rewrite
the application to use less stack.
Hope this helps,
Frank
--
// Frank Mikalsen, System developer, Medicom Systems, Norway
// Homepage: http://home.sol.no/frankm
// Author of ShareWare: SILENT PARTNER BACKUP SCREENSAVER v2.50
// Download: http://www.winsite.com/pc/win3/desktop/spbck250.zip
Where can I find a list of runtime errors?
TIA
________________________________________________
Juan Jose Perez
ciberteca de Madrid [Jua...@ciberteca.es]
General Peron, 32 Bajo [Madrid]
> Anybody knows what's this error, it appears when I call a function, at the
> Begin instruction!, I use this funcion in a lot of programs without
> problems, any hit?
>
> Where can I find a list of runtime errors?
>
most of these errors are in a book called "Delphi Developers Guide".
Error 202 however is not there. I think it means "Stack overflow", caused
by too large local variables, or recursive procedures/functions.
hth
Wolfgang
## CrossPoint v3.1 ##
j> Anybody knows what's this error, it appears when I call a function, at the
j> Begin instruction!, I use this funcion in a lot of programs without
j> problems, any hit?
202 is Stack Overflow.try to enlarge your stack segment, reduce local
variables or move them onto the heap.
j> Where can I find a list of runtime errors?
i think in the help file you can get to a list via the "RunError"
description. at least in BP7 you can.
cu
marc
/--------------------------------------------------------------------------\
|ma...@donut.de marc hoffman@2:2444/1234 ma...@arb-phys.uni-dortmund.de|
\--------------------------------------------------------------------------/
isn't this where...
## CrossPoint v3.1 ##
It's in the main help file, but they forgot to index it. If you can
find a full text search utility (like the one included in Win95), you
can find the runtime errors list. Otherwise, you have to look in the
Language Guide (downloadable from Borland).
Duncan Murdoch
My question is really not about Delphi but more about conventions...
I came across this guideline in a Delphi manual :
DON'T use a function to return multiple values both through
the function result and via var parameters. This use may be
confusing to the reader of the program.
Sometimes, I use function results to return error codes and
parameters to modify specific contents. Isn't this used extensively in
predefined 'C' functions ?
What do you think ?
Is there links with information on general programming conventions and
conventions specific to Delphi ?
Thanks,
Tony
----------------------------------------------------------------------------
Tony Roy Tel : (506) 547-2145
Instructor - Computer Science Fax : (506) 547-2174
New Brunswick Community College e-mail : ro...@gov.nb.ca
Bathurst, NB, Canada
----------------------------------------------------------------------------
>Anybody knows what's this error, it appears when I call a function, at the
>Begin instruction!, I use this funcion in a lot of programs without problems,
>any hit?
Runtime error 202 is Stack Overflow Error.
You have probably used a lot of local variables in this function or in the
function
that call this function.
You can solve this problem by increasing the Stack Size in the project
options.
> Where can I find a list of runtime errors?
I have the runtime errors list from my old Turbo Pascal 6.0
i haven't found it in Delphi help.
Nir Sofer
n...@netvision.net.il
I agree with you completely - sometimes you DO need to return an error
code as the result of the function call, and return other values in var
parameters. The function declaration and header should be enough
information for the user to understand, IMO.
Ken Whiet
> Path: diku.dk!news.uni-c.dk!newsfeed.sunet.se!news00.sunet.se!sunic!news.sprintlink.net!newsfeed.internetmci.com!in2.uu.net!newstf01.news.aol.com!newsbf02.news.aol.com!not-for-mail
> From: qpwp...@aol.com (QPWPlatts)
> Newsgroups: comp.lang.pascal.delphi.misc
> Date: 26 Mar 1996 17:30:33 -0500
> Organization: America Online, Inc. (1-800-827-6364)
> Lines: 8
> Sender: ro...@newsbf02.news.aol.com
> References: <4j6f5n$9...@darwin.nbnet.nb.ca>
> Reply-To: qpwp...@aol.com (QPWPlatts)
> NNTP-Posting-Host: newsbf02.mail.aol.com
Couldn't you handle it with exceptions instead?
Mads
--
+---------------------------------------------------------------------+
| Mads Bondo Dydensborg. Student at DIKU, Copenhagen - Denmark. |
| Email: mad...@diku.dk www: http://www.diku.dk/students/madsdyd |
+---------------------------------------------------------------------+
I wouldn't say that modifying an argument to a function is unclear, more
that if you never do it then if on coming back to a piece of code n
months later you see "x := func(lots of arguments)" you know instantly
that you don't have to worry about the arguments' return values
changing. Makes your code easier to understand in the long run - to
yourself as well as others.
However, your specific situation of returning an error code as the
function value strikes me as a case where it would be clear what was
going on. Personally I find this a lot less confusing than a function
which returned the value, and an error code in one of the arguments.
Catherine.
Catherine Rees-Lay Cath...@polyhdrn.demon.co.uk
Polyhedron Software Ltd.
Programs for Programmers - QA, Compilers, Graphics
************ Visit our Web site on http://www.polyhedron.co.uk/ ************
However the exception model in Ada is fairly well developed (it can be
improved) and this is the usual way to return a status code of
"unexpected error" from a function.
However all Ada guidelines state quite clearly that a program that
"relies on exceptions for normal operation" should be regarded as
erroneous.
Therefore a function that (for example) performs a directory search for
a file should only return an exception if an error such as "disk error"
were to occur. An error of "file not found" would not normally be
regarded as an exceptional condion (unless you had just put it there!)
and hence a difference mechanism should be used.
So in the latter case either:
a) A procedure with two out parameters (file name, error code)
b) A function, returning some form of record containing file
details and status code.
Of the two I prefer b) if use an OO type method for analysis and design.
This would seem to imply that often an object approach would lead to a
function with an object as a return.
However on top of this (or under maybe) is MS Windows for Delphi
Programmers. This does not use the OO type of model and hence the
question, as I see it, is where the line is drawn between the non OO
approach of MS and the OO approach of Delphi.
Probably now back to square one - but I shall be interested in the views
of others.
--
David Appleton
Thanks
Svein Dybvik
O.A.Halvari AS
email : svein....@oahalvari.telemax.no
Of course you could handle it with an exception (and should if it is
something critical). The error codes I was referring to were non-critical
types of errors (like requesting a read of <x> bytes from a binary file
into a var buffer, and returning the number of actual bytes read). This
doesn't necessarily indicate an exception-type error, but could indicate
that you've reached the end of the file...
I heartily agree that for critical errors you should raise an exception!
Ken