Original Post
Delphi is dead?
Quote:
Original post by Anonymous Poster
Delphi was never alive. Geeks.
Quote:
As long as there are still people programming in Delphi, it will not die and I happen to know quite a few people who still use it as their only IDE/compiler.
while(i<n){ int j,k=map; unsigned long pi=46341; /* 2**-.5 in 0.16 */ unsigned long qi=46341; int qexp=0,shift; long wi=vorbis_coslook_i(k*65536/ln); qi*=labs(ilsp[0]-wi); pi*=labs(ilsp[1]-wi); for(j=3;j<m;j+=2){ if(!(shift=MLOOP_1[(pi|qi)>>25])) if(!(shift=MLOOP_2[(pi|qi)>>19])) shift=MLOOP_3[(pi|qi)>>16]; qi=(qi>>shift)*labs(ilsp[j-1]-wi); pi=(pi>>shift)*labs(ilsp[j]-wi); qexp+=shift; } if (tr == 1) { /* reset a's and b's for modem signal */ state_ptr->a[0] = 0; state_ptr->a[1] = 0; state_ptr->b[0] = 0; state_ptr->b[1] = 0; state_ptr->b[2] = 0; state_ptr->b[3] = 0; state_ptr->b[4] = 0; state_ptr->b[5] = 0; a2p = 0 ; } else { /* update a's and b's */ pks1 = pk0 ^ state_ptr->pk[0]; /* UPA2 */ /* update predictor pole a[1] */ a2p = state_ptr->a[1] - (state_ptr->a[1] >> 7); if (dqsez != 0) { fa1 = (pks1) ? state_ptr->a[0] : -state_ptr->a[0]; if (fa1 < -8191) /* a2p = function of fa1 */ a2p -= 0x100; else if (fa1 > 8191) a2p += 0xFF; else a2p += fa1 >> 5; if (pk0 ^ state_ptr->pk[1]) /* LIMC */ if (a2p <= -12160) a2p = -12288; else if (a2p >= 12416) a2p = 12288; else a2p -= 0x80; else if (a2p <= -12416) a2p = -12288; else if (a2p >= 12160) a2p = 12288; else a2p += 0x80; } /* TRIGB & DELAY */ state_ptr->a[1] = a2p; /* UPA1 */ /* update predictor pole a[0] */ state_ptr->a[0] -= state_ptr->a[0] >> 8; if (dqsez != 0) if (pks1 == 0) state_ptr->a[0] += 192; else state_ptr->a[0] -= 192; /* LIMD */ a1ul = 15360 - a2p; if (state_ptr->a[0] < -a1ul) state_ptr->a[0] = -a1ul; else if (state_ptr->a[0] > a1ul) state_ptr->a[0] = a1ul; /* UPB : update predictor zeros b[6] */ for (cnt = 0; cnt < 6; cnt++) { if (code_size == 5) /* for 40Kbps G.723 */ state_ptr->b[cnt] -= state_ptr->b[cnt] >> 9; else /* for G.721 and 24Kbps G.723 */ state_ptr->b[cnt] -= state_ptr->b[cnt] >> 8; if (dq & 0x7FFF) { /* XOR */ if ((dq ^ state_ptr->dq[cnt]) >= 0) state_ptr->b[cnt] += 128; else state_ptr->b[cnt] -= 128; } } }var pi: Longword; qi: Longword; qexp: Longint; shift: Longint; wi: Longint;begin pi:= 46341; qi:= 46341; qexp:= 0; wi:= vorbis_coslook_i(k * 65536 div ln); qi:= qi * labs(ilsp[0] - wi); pi:= pi * labs(ilsp[1] - wi); j:= 3; while (j < m) do begin shift:= MLOOP_1[(pi or qi) shr 25]; if (shift <> 0) then begin shift:= MLOOP_2[(pi or qi) shr 19]; if (shift <> 0) then shift:= MLOOP_3[(pi or qi) shr 16]; end; qi:= (qi shr shift) * labs(ilsp[j - 1] - wi); pi:= (pi shr shift) * labs(ilsp[j] - wi); qexp:= qexp + (shift); j:= j + 2; end; // while (c++ for)Quote:
Original post by Basic
Delphi is more than alive fools!
:)
As long as I'm around, there will be at least 1 Delphi/Pascal user.
Quote:
Original post by Lifepower
Still, C++ is more popular due to commercial stuff but as a language even though powerful, I think it has significant drawbacks for developing large applications.
Quote:
My major complaint is the case sensitiveness which leads to ambiguity in code (hard to understand)
Quote:
, allows ambiguous statements like "if (a = b)" which leads to run-time errors that are difficult to find.
Quote:
Still, I don't know if it's just me, but most C/C++ code I have seen on the Internet, including the one provided by Sun Microsystems and others (for instance, communication-related standards from ITU) - is very bad written. No or useless comments, one or two letter variables (e.g. "a, b, t, zZ, ae, gj, ...etc") and number constants integrated in the code (like "if (a>31) ja=jb+44;" -> here, what 31 and 44 mean?!) and hardly packed code makes very BAD example of C/C++ usage. So in general, my critics towards C/C++ languages usually goes to the programmers rather than to the language itself. The reason for that, I think is because there are much more C/C++ inexperienced users (compared to Pascal) due to the same commercial stuff.
Y := 0; X := 3; Command := (Source^[1] SHL 8) + Source^[2]; Bit := 16; WHILE (X < SourceSize) DO BEGIN IF (Bit = 0) THEN BEGIN Command := (Source^[X] SHL 8) + Source^[X+1]; Bit := 16; INC(X,2) END; IF ((Command AND $8000) = 0) THEN BEGIN Dest^[Y] := Source^[X]; INC(X); INC(Y) END ELSE BEGIN { command and $8000 } Pos := ((Source^[X] SHL 4) +(Source^[X+1] SHR 4)); IF (Pos = 0) THEN BEGIN Size := (Source^[X+1] SHL 8) + Source^[X+2] + 15; FOR K := 0 TO Size DO begin Dest^[Y+K] := Source^[X+3]; end; INC(X,4); INC(Y,Size+1) END ELSE BEGIN { pos = 0 } Size := (Source^[X+1] AND $0F)+2; FOR K := 0 TO Size DO Dest^[Y+K] := Dest^[Y-Pos+K]; INC(X,2); INC(Y,Size+1) END; { pos = 0 } END; { command and $8000 } Command := Command SHL 1; DEC(Bit) END { while x < sourcesize } END;Quote:
I write all this because I hope that people finally decide to write better code (especially if they plan on releasing it to public) rather than flaming other languages (like "Top 10 reasons why Pascal is better than C"). If your handwriting is ugly it's not the pen - it's how you use it!
Quote:
Edit: As an example, I also include the first part of C/C++ code translated to Pascal by our "C to Pascal compiler". In Pascal, the code is still hard to understand:
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more