🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #18778

LightSpeed Pascal Problem

#18778
From: Karl B. Klashinsky
Date: Fri, 04 Sep 1987 14:05
32 lines
1595 bytes
I'm working on porting a Turbo Pascal Unit to LightSpeed Pascal, and I've
hit a catch.  In the Turbo Unit, the high bit of an integer is set with

	foo := $8000 ;	{set high bit -- value is -32768}

But, LightSpeed won't accept that -- it complains that the
"constant (whose value is -32768) is out of range".

I thought that the range of ints was supposed to be -32768 to +32767.
I've tried the obvious "hacks", with no luck.  For instance:

	i := -32767 ;
	i := i-1 ;	{nope -- int overflow}
or
	i := -16384 ;
	i := 2 * i ;	{ditto}

I don't know why (yet) but the Unit does not work properly if "foo" does not
have the high bit set.

I'm using LSP 1.0.  Can anyone please help me?  Will a more recent version
of LSP help? 

Karl

-- 
Karl Klashinsky                         "Gee, I wish I could find a
University of Victoria                  neat quote to put in my
British Columbia, Canada                .signature"
                                                             <me>
e-mail:	{uw-beaver, ubc-vision}!uvicctr!klash
Technical Details
Message-ID: <320@uvicctr.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!ssc-vax!uvicctr!klash

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!ssc-vax!uvicctr!klash
From: klash@uvicctr.UUCP (Karl B. Klashinsky)
Newsgroups: comp.sys.mac
Subject: LightSpeed Pascal Problem
Message-ID: <320@uvicctr.UUCP>
Date: Fri, 4-Sep-87 10:05:57 EDT
Article-I.D.: uvicctr.320
Posted: Fri Sep  4 10:05:57 1987
Date-Received: Sun, 6-Sep-87 02:46:49 EDT
Reply-To: klash@uvicctr.UUCP (Karl B. Klashinsky)
Organization: University of Victoria, Victoria B.C. Canada
Lines: 32