Cambiata integer() dei real: adesso ritorna long. Sistemati files dipendenti
(ma non erano tutti questi. Boh.) git-svn-id: svn://10.65.10.50/trunk@264 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									867ca4bd7d
								
							
						
					
					
						commit
						0178369ee6
					
				| @ -426,9 +426,9 @@ update_keydef (int key, const char *desc) | ||||
|           _rec->Ky[key].FieldSeq[n] += MaxFields; | ||||
|         else if (sym == _number) | ||||
|         { | ||||
|           _rec->Ky[key].FromCh[n] = inst.number ().integer () - 1; | ||||
|           _rec->Ky[key].FromCh[n] = (int)inst.number().integer() - 1; | ||||
|           inst = c.step (); | ||||
|           _rec->Ky[key].ToCh[n] = _rec->Ky[key].FromCh[n] + inst.number ().integer () - 1; | ||||
|           _rec->Ky[key].ToCh[n] = _rec->Ky[key].FromCh[n] + (int)inst.number ().integer () - 1; | ||||
|           inst = c.step (); | ||||
|         } | ||||
|         else | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| // 	$Id: mailbox.cpp,v 1.1.1.1 1994-08-12 10:52:01 alex Exp $
 | ||||
| // 	$Id: mailbox.cpp,v 1.2 1994-09-19 09:49:41 villa Exp $
 | ||||
| 
 | ||||
| #include <stdlib.h> | ||||
| #include <fstream.h> | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| // 	$Id: mailbox.h,v 1.1.1.1 1994-08-12 10:52:01 alex Exp $
 | ||||
| // 	$Id: mailbox.h,v 1.2 1994-09-19 09:49:42 villa Exp $
 | ||||
| 
 | ||||
| /* si', trattasi di -*-c++-*- */ | ||||
| // Mailbox.h
 | ||||
|  | ||||
| @ -14,8 +14,8 @@ | ||||
| #include <mask.h> | ||||
| #include <utility.h> | ||||
| #include <viswin.h> | ||||
| #include <printapp.h> | ||||
| #include <extcdecl.h> | ||||
| #include <applicat.h> | ||||
| 
 | ||||
| #include <printer.h> | ||||
| #include <execp.h> | ||||
|  | ||||
| @ -14,17 +14,17 @@ HIDDEN real __tmp_real; | ||||
| HIDDEN char __string[80]; | ||||
| const real ZERO (0.0); | ||||
| 
 | ||||
| real ::real () | ||||
| real::real () | ||||
| { | ||||
|   dzero (ptr ()); | ||||
| } | ||||
| 
 | ||||
| real ::real (const real & b) | ||||
| real::real (const real & b) | ||||
| { | ||||
|   dcpy (ptr (), b.ptr ()); | ||||
| } | ||||
| 
 | ||||
| real ::real (double a) | ||||
| real::real (double a) | ||||
| { | ||||
|   dftodr (ptr (), a, 9);        // Round the number (1.0 is NOT 0.999999999)
 | ||||
| 
 | ||||
| @ -32,7 +32,7 @@ real ::real (double a) | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| char *real ::eng2ita (char *s) | ||||
| char *real::eng2ita (char *s) | ||||
| { | ||||
|   if (s) | ||||
|   { | ||||
| @ -43,7 +43,7 @@ char *real ::eng2ita (char *s) | ||||
|   return s; | ||||
| } | ||||
| 
 | ||||
| char *real ::ita2eng (const char *s) | ||||
| char *real::ita2eng (const char *s) | ||||
| { | ||||
|   int j = 0; | ||||
|   if (s) | ||||
| @ -66,7 +66,7 @@ char *real ::ita2eng (const char *s) | ||||
|   return __string; | ||||
| } | ||||
| 
 | ||||
| bool real ::is_real (const char *s) | ||||
| bool real::is_real (const char *s) | ||||
| { | ||||
|   bool ok = FALSE; | ||||
|   if (s) | ||||
| @ -79,7 +79,7 @@ bool real ::is_real (const char *s) | ||||
|   return ok; | ||||
| } | ||||
| 
 | ||||
| real ::real (const char *s) | ||||
| real::real (const char *s) | ||||
| { | ||||
|   if (s) | ||||
|     while (*s == ' ') | ||||
| @ -91,46 +91,46 @@ real ::real (const char *s) | ||||
|     dzero (ptr ()); | ||||
| } | ||||
| 
 | ||||
| real & real ::operator = (const real & b) | ||||
| real & real::operator = (const real & b) | ||||
| { | ||||
|   dcpy (ptr (), b.ptr ()); | ||||
|   return *this; | ||||
| } | ||||
| 
 | ||||
| real & real ::operator = (double a) | ||||
| real & real::operator = (double a) | ||||
| { | ||||
|   const real n (a); | ||||
|   operator = (n); | ||||
|   return *this; | ||||
| } | ||||
| 
 | ||||
| real & real ::operator += (const real & b) | ||||
| real & real::operator += (const real & b) | ||||
| { | ||||
|   dadd (ptr (), ptr (), b.ptr ()); | ||||
|   return *this; | ||||
| } | ||||
| 
 | ||||
| real & real ::operator += (double a) | ||||
| real & real::operator += (double a) | ||||
| { | ||||
|   __tmp_real = *this; | ||||
|   adddfd (ptr (), __tmp_real.ptr (), a); | ||||
|   return *this; | ||||
| } | ||||
| 
 | ||||
| real & real ::operator -= (const real & b) | ||||
| real & real::operator -= (const real & b) | ||||
| { | ||||
|   __tmp_real = *this; | ||||
|   dsub (ptr (), __tmp_real.ptr (), b.ptr ()); | ||||
|   return *this; | ||||
| } | ||||
| 
 | ||||
| real & real ::operator *= (const real & b) | ||||
| real & real::operator *= (const real & b) | ||||
| { | ||||
|   dmul (ptr (), ptr (), b.ptr ()); | ||||
|   return *this; | ||||
| } | ||||
| 
 | ||||
| real & real ::operator /= (const real & b) | ||||
| real & real::operator /= (const real & b) | ||||
| { | ||||
|   const DEC *dst = ddiv (ptr (), ptr (), b.ptr ()); | ||||
| 
 | ||||
| @ -145,35 +145,35 @@ real & real ::operator /= (const real & b) | ||||
|   return *this; | ||||
| } | ||||
| 
 | ||||
| TObject *real :: dup () const | ||||
| TObject *real:: dup () const | ||||
| { | ||||
|   return new real (*this); | ||||
| } | ||||
| 
 | ||||
| bool real ::is_zero () const | ||||
| bool real::is_zero () const | ||||
| { | ||||
|   return diszero (ptr ()); | ||||
| } | ||||
| 
 | ||||
| int real ::sign () const | ||||
| int real::sign () const | ||||
| { | ||||
|   return dsign (ptr ()); | ||||
| } | ||||
| 
 | ||||
| real real ::operator - () const | ||||
| real real::operator - () const | ||||
| { | ||||
|   real n; | ||||
|   dchgs (n.ptr (), ptr ()); | ||||
|   return n; | ||||
| } | ||||
| 
 | ||||
| int real ::integer () const | ||||
| long real::integer () const | ||||
| { | ||||
|   return dtoi (ptr ()); | ||||
|   return (long)dtodf(ptr ()); | ||||
| } | ||||
| 
 | ||||
| // Certified 91%
 | ||||
| char *real ::string (int len, int dec, char pad) const | ||||
| char *real::string (int len, int dec, char pad) const | ||||
| { | ||||
|   __tmp_real = *this; | ||||
|   if (dec != UNDEFINED) | ||||
|  | ||||
| @ -48,7 +48,7 @@ public: | ||||
|   int precision() ; | ||||
|   bool is_zero() const; | ||||
|   int sign() const; | ||||
|   int integer() const;  // operator int is too dangerous
 | ||||
|   long integer() const;  // operator int is too dangerous
 | ||||
| 
 | ||||
|   real& round(int prec = 0) ; | ||||
|   real& trunc(int prec = 0) ; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user