TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Allan Mertner
from: Patrick Spence
date: 1996-10-23 16:37:48
subject: Re: Turbo Pascal to OS/2 Pas

While trying to port a program from dos to os/2, I ran across this little
anomoly... in Turbopascal 7.0 a set of uflags (as follows) is 3 bytes in size.
In VP 1.1 it comes out to 4 bytes...

In the VP manual, you specify size of a set as :
  size=(High(BaseType) div 8) - (Low(BaseType) div 8) + 1

in my TP manual they list a sets size as:
  ByteSize = (Max div 8) - (Min div 8) + 1

So what it looks like, is either the math done by TP is wrong (if the set
values are 1..24) or right (if 0..23)... and the same with VP...

Regardless of which one is doing what, do you know of a method I can use to
force VP to use 3 bytes for the size?  it works fine in TP, with all elements
being accessable, so I don't know if VP is giving an extra byte, or is
starting with different assumptions..  I really don't want to have different
data files between the versions, so would like an easy work around if you
know one...  Thanks..

  newac:set of uflags;              { new AC }
  uflags =
   (rlogon,                       { L - Limited to one call a day }
    rchat,                        { C - No SysOp paging }
    rvalidate,                    { V - Posts are unvalidated }
    ruserlist,                    { U - Can't list users }
    ramsg,                        { A - Can't leave automsg }
    rpostan,                      { * - Can't post anonymously }
    rpost,                        { P - Can't post }
    remail,                       { E - Can't send email }
    rvoting,                      { K - Can't use voting booth }
    rmsg,                         { M - Force email deletion }
    vt100,                        { Supports VT00 }
    hotkey,                       { hotkey input mode }
    avatar,                       { Supports Avatar }
    pause,                        { screen pausing }
    novice,                       { user requires novice help }
    ansi,                         { Supports ANSI }
    color,                        { Supports color }
    alert,                        { Alert SysOp upon login }
    smw,                          { Short message(s) waiting }
    nomail,                       { Mailbox is closed }
    fnodlratio,                   { 1 - No UL/DL ratio }
    fnopostratio,                 { 2 - No post/call ratio }
    fnocredits,                   { 3 - No credits checking }
    fnodeletion);                 { 4 - Protected from deletion }


Patrick Spence

--- Renegade v96-287.0b dos
* Origin: If you can't Lay em, Slay em! - Freya (1:114/252)
SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1
@PATH: 114/252 153 314 262 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.