• sets in tp

    From Chris Hoppman@1:129/305 to All on Sunday, September 26, 2004 14:33:45
    Okay. What is up with Sets in tp/bp that one with 24 elements and another with the same amount will return different sizeof's??
    I thought I would throw a couple of duds in the set to make up for the extra byte in the delphi problem and not have it effect much in the record *.dat file I am working with, but darn! Is it cause of the ?? was going to say typed vs non typed (int vs var type of thing), but a set can't be a var?
    Just preplex'd about this.


    program testset;
    uses crt;
    type
    aset = 1..24;
    bset = (rlogon, {1}
    rchat, {2}
    rvalidate {3}
    ruserlist {4}
    ramsg, {5}
    rpostan, {6}
    rpost, {7}
    remail, {8}
    rvoting, {9}
    rmsg, {10}
    vt100, {11}
    hotkey, {12}
    avatar, {13}
    pause, {14}
    novice, {15}
    ansi, {16}
    color, {17}
    alert, {18}
    smw, {19}
    nomail, {20}
    fnodlratio, {21}
    fnopostratio, {22}
    fnocredits, {23}
    fnodeletion); {24}
    begin
    clrscr;
    writeln('Set A SizeOf: ',Sizeof(aset));
    Writeln('Set B SizeOf: ',Sizeof(bset));
    writeln;
    write('press a key');
    repeat until keypressed;
    end.
    --- Renegade v09-19.4 DOS
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)