Very
very complex logic can be modelled with decision tables to be sure you catch all
the paths.
-Original Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Neven
MacEwanSent: Tuesday, September 18, 2001 6:22 PMTo:
Multiple recipients of list
Mark,
Don4t be worried !
It4s very simple to develop complex algorithms
without lose your head.
First of all, you must be used to use indentation.
I use indentation of 3 blank spaces. It4s visually
more confortable do follow a logical sequence with a
good indentation !
Second: Allways
CORBA/MIDAS x SQL SERVER 2000
I'm developing a SERVER application and a CLIENT
application using the
DELPHI 5 CORBA components running on Windows 98.
I use ADO and SQL Server 2000 in the server
application with no
problems.
The problem begins in the client application, while I
set
thanks guys. Weird thing is I'm not doing any of those???
- Original Message -
From: Robert Martin [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Tuesday, September 18, 2001 4:05 PM
Subject: Re: [DUG]: closing modal form.
Setting modalresult to 0
Tottally agree Paul. Always using begin... end makes errors far less common
and your code much more readable. We use 4 space tabs, which both makes
tabbing very obvious and also serves to discourage extremely nested ifs.
Robert Martin
Software Engineer
Wild Software Ltd
- Original Message
Ok
Thanks for all suggestions.
the practice of departmentalising (or encapsulating - to use a less buzzy
word) some of the logic allowed me to move a sub-nest (if..then..else) to a
seperate procedure and to see the logic more clearly.
Neven's case... example looks very neat but *this*
Are you using a message box, or a form of your own that you have made modal?
If the latter, can you free the form and will it then go away?
I have the same problem in an app. It may be necessary to make the form
modal in some other way.
-Original Message-
From: [EMAIL PROTECTED]
I prefer the Begin and Ends to line up as in (a), it makes it easier to see
a block at a glance, but it is really a personal preference.
Just like using :
for a := 1 to Pred(AnObject.Count) do
Instead of :
for a := 1 to AnObject.Count - 1 do
etc
SNIP
BTW any preferences for begin end
Personally I find
if blah then begin
DoStuff
end
easier to read.
Robert Martin
Software Engineer
Wild Software Ltd
- Original Message -
From: Mark Howard [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2001 10:49 AM
In a previous language I used, begin...end blocks had an overhead so were
definately not recommended for single statements. I'm not sure about
Pascal/Delphi.
Ross.
Robert Martin wrote:
Tottally agree Paul. Always using begin... end makes errors
far less common
and your code much more
-- Original Message --
BTW any preferences for begin end layout?
Most definately:
if blah then
begin
DoStuff;
if Blat then
begin
DoSomething;
DoOtherStuff;
end
else
DoSomethingDifferent;
end;
As you can see I
Ha ha :)
- Original Message -
From: Steve Peacocke [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2001 10:34 AM
Subject: Re: [DUG]: closing modal form.
-- Original Message --
From:
Yer there is an ftpclient (ICS) component on the main form and I am
wondering if it is doing something weird to the application that makes the
form unable to react to that property being set.
I haven't tried freeing it at that point. Ill give that a shot out of
interest but I think I'm just
Steve
Yeah lets start the old begin end placement debate :-)
I use
If cond then
begin
dostuff
end
because of the old habit of finding the missing b/e in an editor that
couldn't check
but it gets messy with a block after else
If cond then
begin
dostuff1
end
esle
begin
dostuff2
end
so
I'm updating a
project from Delphi 3 to Delphi 5.
One of the components
causes this error message at compile time:
"cannot find unit
dsgnintf.dcu"
I checked and found
only a dsgnintf.int file, not a dcu or pas. But Delphi 3 puts a Dsgnintf.dcu
unit into its Lib directory.
The reference
Design-time only code (e.g. component editors) needs to
be kept in separate units.
These
units will only compile as part of a package: instead of a .dcu, the compiled
code is in one of the system .bpls.
Regards, Paul.
-Original Message-From: Patrick Dunford
[mailto:[EMAIL
I know this goes against common design standards, but I find the following
much easier to read with less clutter:
if something then begin
dostuff
end else begin
dootherstuff
end;
It's definately a personal thing, but as I always tend to use compound
statements I find the begin statement
I have found this also recently updating a D4 to D6 project and couldn't
figure out where it came from as I hadn't seen this unit before either. It
didn't show up in the original D4 uses clauses which I checked. So I decided
it must be something new in the of the package units. I just deleted it
Hi
I am trying to insert new records using a stored procedure. Works ok
until I try passing dates as parameters.
We are using sql server 7 and tadostoredproc with delphi 5.
Executing from sql analyser works ok
Any ideas?
CREATE PROCEDURE InsertSOShipHeader
@ShipperID VARCHAR(15),
@OrdDate
That's the style we use... Have been for years...
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
Behalf Of Stephen Barker
Sent: Wednesday, 19 September 2001 12:07 p.m.
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Help with Logic flows
I know
Mark
Have you considered using a state machine approach? - it may be appropriate.
Paul Lowman
Lowman Consulting Ltd.
Embedded Systems Software
[EMAIL PROTECTED]
---
New Zealand Delphi Users group - Delphi List -
Hi all,
We are looking at developing an in-house application (unless we can find
one already made that will help us to the job) that scans a few pages of
documentation in with a bar code is on the first page...
The scanned pages will be 'attached' to a DB record...
Just wondering if anyone
if something then begin
dostuff
end else begin
dootherstuff
end;
Concise..yes but I think the else should be on the same 'level' as the if so
IMHO
if something then begin
dostuff
end
else begin
dootherstuff
end;
I'm a 2 space indenter any other 2 space indenters out there -
I have a programme which through a menu starts other programmes.
It is important to hide the task bar.
This is no problem except with one programme which restores the task bar
upon returning to my menu programme, despite the lines below:
procedure TForm1.AppOnActivate(Sender: TObject);
begin
DsgnIntf is for registering component editors.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Eion McIntosh (Christchurch)
Sent: Wednesday, 19 September 2001 11:47
To: Multiple recipients of list delphi
Subject: RE: [DUG]: DsgnInft unit D5
wouldn't a scanner (call it via TWAIN?) and a barcode reader (using a
keyboard block) work? 2 pieces of hardware, but the cost of the hardware
should be less than your time to write a barcode recognition system.
I think Gary has done something like this dude, wanna comment?
Nic.
-
There is an application called Teleforms (from Cardiff software), that will
read scanned pages etc and convert barcodes or another forms etc into files.
Don't know the URL but a search should find it.
Myles.
-Original Message-
From: C Fraser [mailto:[EMAIL PROTECTED]]
Sent: Wednesday,
The standard Delphi way (from http://www.econos.de/delphi/cs.html) without
begin/end would look like this
if x=1 then
Say(1)
else if x=2 then
say(2)
else if x=3 then
say(3)
else
say(4);
which turns out much better than a cascading indent, and avoids looking
Hi Nic,
That would work... But we would like it a bit more stream lined...
Say we have 30 'Jobs', each job has a cover sheet with a bar code on it
and an unknown number of pages that want to be scanned and associated
with that job So the system would scan the first page, see if it had
a bar
Nevan wrote
I'm a 2 space indenter any other 2 space indenters out there - unite!
Respect!, I used to use 3 but I'm now a 2 space convert...
-3 was uncannily interoperable (can't think of the correct mathematical
term) with the number of the beast.
-I can't afford a screen/graphics-card big
Take a look at
http://www.slm.wau.nl/wkao/delforexp.html
This little ditty sits in the IDE and is called up with [Ctrl]-D to format your code.
What's even better is that everyone on a team can use whatever formatting suits them,
then format with a single setup. So, once the team leader
If you use
SystemParametersInfo(SPI_SCREENSAVERRUNNING, 1, @NoUse, 0);
The Task bar goes away and stays away until you
SystemParametersInfo(SPI_SCREENSAVERRUNNING, 0, @NoUse, 0);
This also disables system keys like Alt Tab, Ctrl-Alt-Delete, Ctrl-Esc...
Dave.
-Original Message-
Hi
I have an application using ADO that needs to monitor the availability of a
SQL7 / 2000 database. If the connection is lost the connection needs to be
reestablished as soon as the database is available.
At present the Connected status does not change when the connection is lost.
Can
AN APOCRYPHL TALE
I agree with Neven's style:
if something then begin
dostuff
end
else begin
dootherstuff
end;
This is a true story of a bug that was VERY expensive to repair, and had the
above style
been used would never have occurred:
Once apon a time, long ago in Turbo
Problem solved. FYI - this is how we get around it:
CREATE PROCEDURE InsertSOShipHeader
@ShipperID VARCHAR(15),
@OrdDate VARCHAR(20)
AS
INSERT INTO SOShipHeader (
ShipperID,
OrdDate
)
VALUES (
@ShipperID,
CAST(@OrdDate AS SMALLDATETIME)
)
CHEERS - Cheng
Don
Thanks for that suggestion - I'll certainly track that down.
All the other input is useful too - the whys are often more valuable than
the whats!
Mark
- Original Message -
From: Don Macrae [EMAIL PROTECTED]
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Sent: Wednesday,
I use:
if cond1 then begin
end else begin
end;
and then fill in the bits after, like:
if cond1 then begin
CodeChunkEvenIfJustOneLine;
end else begin
CodeChunkUnlessNoElseWanted;
end;
Project Jedi publish a preference. If I didn't already prefer my own way,
I would almost certainly go for
Greetings,
We have another position going for a delphi programmer working for a company
based in Byron Ave, Takpuna on the North Shore.
Position would suit competent programmer (not necessarily Delphi but
preferred) with an interest in multimedia programming. The job is
programming for a
I dont know if someone has mentioned it alread... an exception in
closequery, close or destroy will invariably abort teh close process.
To: Multiple recipients of list delphi [EMAIL PROTECTED]
Send reply to: [EMAIL PROTECTED]
From: Matthew Comb
AN APOCRYPHL TALE
I agree with Neven's style:
if something then begin
dostuff
end
else begin
dootherstuff
end;
When I first learned Pascal in school (during the Jurassic period)
we were encouraged to code if/then/else like this:
if something
then begin
dostuff
40 matches
Mail list logo