Re: Something that really annoys me in Delphi ...
From: Duncan Murdoch (dmurdoch_at_pair.com)
Date: 01/07/04
- Next message: Rob Kennedy: "Re: Something that really annoys me in Delphi ..."
- Previous message: Maarten Wiltink: "Re: Something that really annoys me in Delphi ..."
- In reply to: Nicolai Hansen: "Re: Something that really annoys me in Delphi ..."
- Next in thread: Bjørge Sæther: "Re: Something that really annoys me in Delphi ..."
- Reply: Bjørge Sæther: "Re: Something that really annoys me in Delphi ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 07 Jan 2004 17:22:08 -0500
On 7 Jan 2004 06:31:37 -0800, nic@aub.dk (Nicolai Hansen) wrote:
>Actually not. If I use enumerations, I keep them in range. This is
>easily done as they initialise to "0" (first value),
I might be misreading you, but just in case: variables in Delphi
don't get automatically initialized to 0.
>and within a
>type-safe language like Delphi, should be safe to get assigned
>out-of-range values.
Delphi can be used in a type-safe way, but it contains unsafe
constructs (like typecasts), untyped var parameters, etc. I wouldn't
call it a type-safe language.
>What I am looking for is to get a compiler warning removed. It is
>clearly a wrong warning in my eyes. There is nothing wrong with the
>code at the point it warns about. IF my function fails to return a
>value, it is because of a problem _elsewhere_ in the code. I would
>rather see it warn at that spot.
You're very trusting of the run-time library not to stomp on your
local variables, aren't you? A lot of the run-time (i.e. the parts in
Windows DLLs) is written in C by Microsoft, so your trust might be
misplaced.
Duncan Murdoch
- Next message: Rob Kennedy: "Re: Something that really annoys me in Delphi ..."
- Previous message: Maarten Wiltink: "Re: Something that really annoys me in Delphi ..."
- In reply to: Nicolai Hansen: "Re: Something that really annoys me in Delphi ..."
- Next in thread: Bjørge Sæther: "Re: Something that really annoys me in Delphi ..."
- Reply: Bjørge Sæther: "Re: Something that really annoys me in Delphi ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|