[pso] tema 3 - linux MAXINT

Andrei Costin pso@cursuri.cs.pub.ro
Wed, 20 Apr 2005 23:00:50 -0700 (PDT)


--0-1745092702-1114063250=:11282
Content-Type: text/plain; charset=us-ascii

Eu mi l-am definit singur. Poti sa-l scrii asa
#define MAXINT 0x7FFFFFFF - asa in cazul ca esti sigur ca intul e pe 32 biti unde va rula driverul
sau asa #define MAXINT 2147483647
 
As sugera urmatoarea varianta :D
#define MAXINT ( ((long int)1) << sizeof(int)*8 ) - 1

Alexandru Gartner <mgalex@gmx.net> wrote:
Am si eu o intrebare...(nu ma injuratzi prea tare)...ce e cu MAXINT-ul asta
?
E definit pe undeva ?

Mersi!

-- 
+++ NEU: GMX DSL_Flatrate! Schon ab 14,99 EUR/Monat! +++

GMX Garantie: Surfen ohne Tempo-Limit! http://www.gmx.net/de/go/dsl
_______________________________________________
pso mailing list
pso@cursuri.cs.pub.ro
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--0-1745092702-1114063250=:11282
Content-Type: text/html; charset=us-ascii

<DIV>Eu&nbsp;mi l-am definit singur. Poti sa-l scrii asa</DIV>
<DIV>#define MAXINT 0x7FFFFFFF&nbsp;- asa in cazul ca esti sigur ca intul e pe 32 biti unde va rula driverul</DIV>
<DIV>sau asa #define MAXINT 2147483647</DIV>
<DIV>&nbsp;</DIV>
<DIV>As sugera urmatoarea varianta :D</DIV>
<DIV>#define MAXINT&nbsp;( ((long int)1) &lt;&lt; sizeof(int)*8 ) - 1<BR><BR><B><I>Alexandru Gartner &lt;mgalex@gmx.net&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Am si eu o intrebare...(nu ma injuratzi prea tare)...ce e cu MAXINT-ul asta<BR>?<BR>E definit pe undeva ?<BR><BR>Mersi!<BR><BR>-- <BR>+++ NEU: GMX DSL_Flatrate! Schon ab 14,99 EUR/Monat! +++<BR><BR>GMX Garantie: Surfen ohne Tempo-Limit! http://www.gmx.net/de/go/dsl<BR>_______________________________________________<BR>pso mailing list<BR>pso@cursuri.cs.pub.ro<BR>http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso<BR></BLOCKQUOTE><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com 
--0-1745092702-1114063250=:11282--