eGospodarka.pl
eGospodarka.pl poleca

eGospodarka.plGrupypl.comp.programmingPascalRe: Pascal
  • Data: 2011-03-13 11:45:46
    Temat: Re: Pascal
    Od: "Marcin 'Qrczak' Kowalczyk" <q...@g...com> szukaj wiadomości tego autora
    [ pokaż wszystkie nagłówki ]

    On 11 Mar, 00:26, A.L. <l...@a...com> wrote:
    > Oj, dostalo sie Pascalowi ostatnio, dostalo....
    >
    > Ale nei dla wszystkich Pascal to "sredniowieczny jezyk" Polecam portal
    > posiwecony Pascalowi i standardowi ISO:
    [...]
    > http://www.moorecad.com/standardpascal/

    http://www.moorecad.com/standardpascal/pascalfaq.htm
    l

    "Q. How do I perform string operations in standard Pascal?

    A. [...] In Pascal, by contrast, you must declare a string as a fixed
    length array:
    var string: packed array [1..50] of char;
    Which means that all of your strings must have the same length as the
    handler routines expect. [...]

    Q. What are "space padded" strings ?

    A. No matter what the length of string, the first and best trick is to
    make extensive use of space padded strings [...]

    To find the length of a blank padded string:
    var e: integer;
    s: packed array [1..100] of char;
    ...
    e := 100; { set maximum }
    { find end of string }
    while (s[e] > 1) and (s[e] = ' ') do e := e-1;
    Will set e to be the last character of the string, or to 1 if the
    string is empty. A check for a blank string need not be:
    s = ' ';
    or similar, but simply:
    s[1] = ' ';
    Because if the first character is empty, the entire string is usually
    empty as well."

    To jest żałosne. Jeśli Pascal nie oferuje sensownych stringów i
    tablic, których długość nie jest znana statycznie, to określenie
    "średniowieczny język" jest na miejscu.

Podziel się

Poleć ten post znajomemu poleć

Wydrukuj ten post drukuj


Następne wpisy z tego wątku

Najnowsze wątki z tej grupy


Najnowsze wątki

Szukaj w grupach

Eksperci egospodarka.pl

1 1 1

Wpisz nazwę miasta, dla którego chcesz znaleźć jednostkę ZUS.

Wzory dokumentów

Bezpłatne wzory dokumentów i formularzy.
Wyszukaj i pobierz za darmo: