delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/02/25/00:03:43.1

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Sterten AT aol DOT com
Message-ID: <140.3ef15c87.2f500941@aol.com>
Date: Thu, 24 Feb 2005 23:53:21 EST
Subject: long long
To: djgpp AT delorie DOT com
MIME-Version: 1.0
X-Mailer: 9.0 SE for Windows sub 5003
Reply-To: djgpp AT delorie DOT com

-------------------------------1109307201
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

>DJGPP already supports 64-bit variables: there's the `long long'  data
>type which is 64-bit wide.
 

very good ! Thanks. I didn't know that. Probably because it's  different
in other compilers so when someone sends me a program which uses  64-bit
then I can't compile it. 
 
#define int long long
//#define %i %Li  , this doesn't work
int  i,j;
main(){
i=13267364410352;
m1:printf("short:%i  long:%Li\n",i,i); //this doesn't work. Why ?
printf("short:%i  ",i);printf("long:%Li\n",i); //this works
if(i%2==0){i=i/2;goto  m1;}
}

-------------------------------1109307201
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3DUS-ASCII">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR></HEAD>
<BODY id=3Drole_body style=3D"FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY:=20=
Arial"=20
bottomMargin=3D7 leftMargin=3D7 topMargin=3D7 rightMargin=3D7><FONT id=3Drol=
e_document=20
face=3DArial color=3D#000000 size=3D2><FONT id=3Drole_document face=3DArial=20=
color=3D#000000=20
size=3D2>
<DIV>&nbsp;&gt;DJGPP already supports 64-bit variables: there's the `long lo=
ng'=20
data<BR>&nbsp;&gt;type which is 64-bit wide.</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>very good ! Thanks. I didn't know that. Probably because it's=20
different<BR>in other compilers so when someone sends me a program which use=
s=20
64-bit<BR>then I can't compile it. </DIV>
<DIV>&nbsp;</DIV>
<DIV>#define int long long<BR>//#define %i %Li&nbsp; , this doesn't work<BR>=
int=20
i,j;<BR>main(){<BR>&nbsp;&nbsp; i=3D13267364410352;<BR>m1:printf("short:%i=20
long:%Li\n",i,i); //this doesn't work. Why ?<BR>&nbsp;&nbsp; printf("short:%=
i=20
",i);printf("long:%Li\n",i); //this works<BR>&nbsp;&nbsp; if(i%2=3D=3D0){i=
=3Di/2;goto=20
m1;}<BR>}</DIV></FONT></FONT></BODY></HTML>

-------------------------------1109307201--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019