Board index » delphi » REPORTED TO ISP
Dirk Claessen
![]() Delphi Developer |
Tue, 11 May 2004 04:27:32 GMT
REPORTED TO ISP
NumberOfSpammers := NumberOfSpammers - 1; <g>
======================================= |
Dirk Claessen
![]() Delphi Developer |
Tue, 11 May 2004 04:27:32 GMT
REPORTED TO ISP
NumberOfSpammers := NumberOfSpammers - 1; <g>
======================================= |
Dodg
![]() Delphi Developer |
Tue, 11 May 2004 05:45:28 GMT
Re:REPORTED TO ISPOn Thu, 22 Nov 2001 21:27:32 +0100, "Dirk Claessens" <will.bou...@back.com> waffled on about something: Quote>NumberOfSpammers := NumberOfSpammers - 1; <g> dec(numberofspammers); Or maybe numberofspammers--; :o) Good work anyway! |
Greg Westo
![]() Delphi Developer |
Tue, 11 May 2004 06:16:04 GMT
Re:REPORTED TO ISPIn article <0dsqvts38v79489u0tsmdji63fkua97...@4ax.com>, Dodgy Quote<Do...@earth.planet.universe> wrote: this... Quote> Or maybe |
Esther Michae
![]() Delphi Developer |
Tue, 11 May 2004 17:13:07 GMT
Re:REPORTED TO ISPIn article <221120011716099729%gwestonREM...@CAPShome.com>, Greg Weston Quote<gwestonREM...@CAPShome.com> wrote: Quite frankly, I find it just too cutesy-poo for words to replace good-old i := i + 1; with inc(i) ARE there good reasons for using the latter? (Apart from fewer |
Erwin Dokte
![]() Delphi Developer |
Tue, 11 May 2004 19:49:28 GMT
Re:REPORTED TO ISPQuoteEsther Michaels wrote: and recommends using it in loops instead of using i := i + 1. Probable difference is stack vs. register operation. -- Erwin Dokter |
Udo Nesshoeve
![]() Delphi Developer |
Tue, 11 May 2004 20:49:03 GMT
Re:REPORTED TO ISPHi Esther, Quote>Which reminds me: what IS this inc() and dec() business with Delphi? | Category | ordinal routines | procedure Inc(var X [ ; N: Longint ] ); | | Description | The Inc procedure adds one or N to the variable X. | X is a variable of an ordinal type (including Int64), or of type PChar | if the extended syntax is enabled, and N is an integer-type expression. | Inc can be used on enumerated types or on pointer variables. \==== I use it to kinda unify the look of the source code. Cheers, |
Frank Peel
![]() Delphi Developer |
Tue, 11 May 2004 23:29:02 GMT
Re:REPORTED TO ISPQuote"Udo Nesshoever" <newsgroup.re...@gmx.net> wrote in message Quote> Hi Esther, the size of what the pointer points to and all. Example at the bottom. It's kind of interesting. This was discovered in TurboPascal 6, by FP Here's the example program for using Inc() to step a pointer variable {$apptype console} Const Var |
Colin Dawso
![]() Delphi Developer |
Tue, 11 May 2004 23:34:59 GMT
Re:REPORTED TO ISPQuote"Frank Peelo" <fpe...@eircom.net> wrote in message Quote
it may be right. the i:=i+1 is an Assembler Add command whereas also because it's a memory item that's being Inc'ed it has the side effects |
Frank Peel
![]() Delphi Developer |
Wed, 12 May 2004 00:16:17 GMT
Re:REPORTED TO ISPQuote"Colin Dawson" <N...@cdawson.tele2.co.uk> wrote in message Quote
... Quote
an array reference or something like that: a[x*x+2] := a[x*x+2]+1; Quote> also because it's a memory item that's being Inc'ed it has the side pointer through an array. So you don't just add 1 to the pointer, the compiler has to find out (at compile time) what the size of an element in the array is, and add that amount. That's why I believe it wouldn't have happened by accident. If it was accidental the pointer would be incremented by 1 and would then be invalid - unless it was a pointer to one-byte objects, like PChar. The documentation says only PChar can be inc()ed like that, suggesting that it is an addition of 1, but that's not how the program behaves. FP - Hide quoted text - - Show quoted text - Quote |
J Fren
![]() Delphi Developer |
Wed, 12 May 2004 00:20:41 GMT
Re:REPORTED TO ISPOn Fri, 23 Nov 2001 15:34:59 -0000, "Colin Dawson" Quote<N...@cdawson.tele2.co.uk> wrote: Quote
INC AX is an assembler command and it simply adds 1 to AX DEC AX simply subtracts 1 from AX What Frank is talking about is something that surprizes me - he is Realistically Delphi produces optimized ASM - and given some of the The other variation of Inc is : Inc( N, 5 ) I personally reckon that Inc( N ) was produced as a substitute for ++N The stuff that Fran Peelo pointed out has made me wholeheartedly agree Actually downright dangerous. BTW - ASM does not run much faster than well written Delphi - actually A real bore. Quote
|
Frank Peel
![]() Delphi Developer |
Wed, 12 May 2004 00:33:34 GMT
Re:REPORTED TO ISPQuote"J French" <je...@iss.u-net.com> wrote in message Quote> On Fri, 23 Nov 2001 15:34:59 -0000, "Colin Dawson" what pchar points at. If you inc() a pchar it points to the next char in the array. You'd Inc(x) increments x. If x involves complex addressing it can improve Personally, I think inc(x); is more readable than x := x+1, but you - Hide quoted text - - Show quoted text - Quote> Realistically Delphi produces optimized ASM - and given some of the does other stuff. You're right, it is ++N, but also p++ for stepping pointers through FP |
David C. Ullri
![]() Delphi Developer |
Wed, 12 May 2004 00:52:12 GMT
Re:REPORTED TO ISPOn Fri, 23 Nov 2001 22:13:07 +1300, e_...@my-deja.com (Esther QuoteMichaels) wrote: Quote>Quite frankly, I find it just too cutesy-poo for words to replace good-old with optimizing compilers. But in the old days the point was (and possibly still is) that inc increments the variable "in place", as opposed to i:= i + 1, which reads the value of i from somewhere to somewhere, adds 1 to the value, and then writes the result back to i. inc should be more efficient (again, it certainly was more efficient years ago, how much it matters these days is not clear.) Quote> (Apart from fewer |
1. reported to ISP - was : Start a Travel Business 4503
3. reported to ISP; ( WAS: MANY EASY, GREAT-PAYING JOBS AVAILABLE!!)
4. How can I obtain IP addressassigned to my Cable router. it is DHCP ISP assigned by ISP
6. Pascal-supportive ISP's--where?