Patch level : 12.0 no patch
Files correlati : Commento : formed.cpp: - Eliminata constante 1.0 sostituita con UNO fraction.h: - Sistemati gli operator di confronto real.h: - Aggiunti inline operator di confronto anche per i longdouble real.cpp: - Calcolata una differenza in TDistrib::get per risolvere un ambiguità sugli operator report.h & reputils.h: - Spostati i TProgram_report da report.h a reputils.h report.cpp: - Costruito real da numero 999999999L per ovviare ambiguità sull'operator di confronto strings.h: - Aggiunte serie di funzioni get del token successivo per TToken_string tokens.h: - Aggiunte alcune keywords per le maschere git-svn-id: svn://10.65.10.50/branches/R_10_00@23276 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									667be87ef0
								
							
						
					
					
						commit
						4cf15392f8
					
				| @ -707,7 +707,7 @@ bool TPrint_section::repos_fields(const char* name, int size) | ||||
|             { | ||||
|               TForm_item& fi = sec->field(i); | ||||
|               short value =  fi.x(); | ||||
|               if (value > 0 && (prm.ratio != 1.0)) | ||||
|               if (value > 0 && (prm.ratio != UNO)) | ||||
|               { | ||||
|                 real x_pos; | ||||
|                 x_pos = value * prm.ratio; | ||||
|  | ||||
| @ -68,7 +68,7 @@ public: | ||||
|   // @cmember Costruttore
 | ||||
|   fraction(); | ||||
|   // @cmember Costruttore
 | ||||
|   fraction(const real &num, const real& den); | ||||
|   fraction(const real &num, const real& den = UNO); | ||||
|   fraction(__int64 num, __int64 den = 1) : _num(num), _den(den) { simplify(); } | ||||
|   // @cmember Costruttore
 | ||||
|   fraction(const fraction& b) ; | ||||
| @ -95,35 +95,35 @@ bool operator ==(const fraction& a, const fraction& b) ; | ||||
| bool operator !=(const fraction& a, const fraction& b) ; | ||||
| 
 | ||||
| // Valanga apparentemente inutile: aggiungere solo cio' che serve veramente!
 | ||||
| inline fraction operator +(const real& a, const fraction& b) { return ::operator +((fraction)a, b);} | ||||
| inline fraction operator +(const real& a, const fraction& b) { return ::operator +(fraction(a), b);} | ||||
| inline fraction operator +(const fraction& a, const real& b) { return ::operator +(b, a);} | ||||
| inline fraction operator +(const fraction& a, __int64 b) { return ::operator +(a, (fraction)b);} | ||||
| inline fraction operator +(const fraction& a, __int64 b) { return ::operator +(a, fraction(b));} | ||||
| inline fraction operator +(__int64 a, const fraction& b) { return ::operator +(b, a);} | ||||
| inline fraction operator -(const real& a, const fraction& b) { return ::operator -((fraction)a, b);} | ||||
| inline fraction operator -(const fraction& a, const real& b) { return ::operator -(a, (fraction)b);} | ||||
| inline fraction operator -(const fraction& a, __int64 b) { return ::operator -(a, (fraction)b);} | ||||
| inline fraction operator -(__int64 a, const fraction& b) { return ::operator -((fraction)a, b);} | ||||
| inline fraction operator *(const real& a, const fraction& b) { return ::operator *((fraction)a, b);} | ||||
| inline fraction operator -(const real& a, const fraction& b) { return ::operator -(fraction(a), b);} | ||||
| inline fraction operator -(const fraction& a, const real& b) { return ::operator -(a, fraction(b));} | ||||
| inline fraction operator -(const fraction& a, __int64 b) { return ::operator -(a, fraction(b));} | ||||
| inline fraction operator -(__int64 a, const fraction& b) { return ::operator -(fraction(a), b);} | ||||
| inline fraction operator *(const real& a, const fraction& b) { return ::operator *(fraction(a), b);} | ||||
| inline fraction operator *(const fraction& a, const real& b) { return ::operator *(b, a);} | ||||
| fraction operator *(const fraction& a, __int64 b); | ||||
| inline fraction operator *(__int64 a, const fraction& b) { return ::operator *(b, a);} | ||||
| inline fraction operator /(const real& a, const fraction& b) { return ::operator /((fraction)a, b);} | ||||
| inline fraction operator /(const fraction& a, const real& b) { return ::operator /(a, (fraction)b);} | ||||
| inline fraction operator /(const real& a, const fraction& b) { return ::operator /(fraction(a), b);} | ||||
| inline fraction operator /(const fraction& a, const real& b) { return ::operator /(a, fraction(b));} | ||||
| fraction operator /(const fraction& a, __int64 b); | ||||
| fraction operator /(__int64 a, const fraction& b); | ||||
| 
 | ||||
| inline bool operator <(const real& a, const fraction& b) { return ::operator < (a, (real)b);} | ||||
| inline bool operator <(const fraction& a, const real& b) { return ::operator <((real) a, b);} | ||||
| inline bool operator >(const real& a, const fraction& b)  { return ::operator > (a, (real)b);}; | ||||
| inline bool operator >(const fraction& a, const real& b) { return ::operator >((real) a, b);} | ||||
| inline bool operator <=(const real& a, const fraction& b) { return ::operator <= (a, (real)b);} | ||||
| inline bool operator <=(const fraction& a, const real& b) { return operator <=((real) a, b);} | ||||
| inline bool operator >=(const real& a, const fraction& b) { return operator >=(a, (real) b);} | ||||
| inline bool operator >=(const fraction& a, const real& b) { return operator >=((real) a, b);} | ||||
| inline bool operator ==(const real& a, const fraction& b) { return operator ==(a, (real) b);} | ||||
| inline bool operator ==(const fraction& a, const real& b) { return operator ==((real) a, b);} | ||||
| inline bool operator !=(const real& a, const fraction& b) { return operator !=(a, (real) b);} | ||||
| inline bool operator !=(const fraction& a, const real& b) { return operator !=((real) a, b);} | ||||
| inline bool operator <(const real& a, const fraction& b)  { return ::operator <  (fraction(a), b);} | ||||
| inline bool operator <(const fraction& a, const real& b)  { return ::operator >  (fraction(b), a);} | ||||
| inline bool operator >(const real& a, const fraction& b)  { return ::operator >  (fraction(a), b);} | ||||
| inline bool operator >(const fraction& a, const real& b)  { return ::operator <  (fraction(b), a);} | ||||
| inline bool operator <=(const real& a, const fraction& b) { return ::operator <= (fraction(a), b);} | ||||
| inline bool operator <=(const fraction& a, const real& b) { return ::operator >= (fraction(b), a);} | ||||
| inline bool operator >=(const real& a, const fraction& b) { return ::operator >= (fraction(a), b);} | ||||
| inline bool operator >=(const fraction& a, const real& b) { return ::operator <= (fraction(b), a);} | ||||
| inline bool operator ==(const real& a, const fraction& b) { return ::operator == (fraction(a), b);} | ||||
| inline bool operator ==(const fraction& a, const real& b) { return ::operator == (fraction(b), a);} | ||||
| inline bool operator !=(const real& a, const fraction& b) { return ::operator != (fraction(a), b);} | ||||
| inline bool operator !=(const fraction& a, const real& b) { return ::operator != (fraction(b), a);} | ||||
| 
 | ||||
| 
 | ||||
| void swap(fraction& a, fraction& b) ; | ||||
|  | ||||
| @ -1652,9 +1652,13 @@ real TDistrib::get () | ||||
|   CHECK (_current < _slices.items(), "TDistrib: too many gets"); | ||||
|   real r = _tot * ((real &) _slices[_current++]); | ||||
|   r.round (_decs); | ||||
|   if (r > _tot - _prog) | ||||
| 
 | ||||
|   const real _diff =  _tot - _prog; | ||||
| 
 | ||||
|   if (r > _diff) | ||||
|   { | ||||
|     r = _tot - _prog; _prog = _tot; | ||||
|     r = _diff;  | ||||
| 	_prog = _tot; | ||||
|   } | ||||
|   else | ||||
|     _prog += r; | ||||
|  | ||||
| @ -133,6 +133,19 @@ public: | ||||
| inline long double fnc_min(long double a, long double b){ return a < b ? a : b; } | ||||
| inline long double fnc_max(long double a, long double b) { return a > b ? a : b; } | ||||
| 
 | ||||
| inline bool operator <(const real& a, const real& b) {return (double)a < (double)b;} | ||||
| inline bool operator <(double a, const real& b) {return a < (double)b;} | ||||
| inline bool operator >(const real& a, const real& b) {return (double)a > (double)b;} | ||||
| inline bool operator >(double a, const real& b) {return a > (double)b;} | ||||
| inline bool operator <=(const real& a, const real& b) {return (double)a <= (double)b;} | ||||
| inline bool operator <=(double a, const real& b) {return a <= (double)b;} | ||||
| inline bool operator >=(const real& a, const real& b) {return (double)a >= (double)b;} | ||||
| inline bool operator >=(double a, const real& b) {return a >= (double)b;} | ||||
| inline bool operator ==(const real& a, const real& b) {return (double)a == (double)b;} | ||||
| inline bool operator ==(double a, const real& b) {return a == (double)b;} | ||||
| inline bool operator !=(const real& a, const real& b) {return (double)a != (double)b;} | ||||
| inline bool operator !=(double a, const real& b) {return a != (double)b;} | ||||
| 
 | ||||
| long double operator%(const real& a, const real& b); | ||||
| void swap(real& a, real& b) ; | ||||
| long double sqr(long double) ; | ||||
|  | ||||
| @ -2795,7 +2795,7 @@ void TReport::report2mask(TMask & m) const | ||||
|           { | ||||
|           case CLASS_CURRENCY_FIELD: | ||||
|           case CLASS_REAL_FIELD:  | ||||
|             if (var.as_real() == 999999999L) | ||||
|             if (var.as_real() == real(999999999L)) | ||||
|               var.set_null(); | ||||
|             break; | ||||
|           case CLASS_DATE_FIELD:  | ||||
|  | ||||
| @ -674,17 +674,4 @@ public: | ||||
|   virtual ~TReport(); | ||||
| }; | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| // Report senza maschera
 | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| class TProgram_report : public TReport | ||||
| { | ||||
| protected: | ||||
|   virtual bool use_mask() { return false; } | ||||
| 
 | ||||
| public: | ||||
| 	TProgram_report() {} | ||||
| }; | ||||
| 
 | ||||
| #endif | ||||
|  | ||||
| @ -6,8 +6,8 @@ | ||||
| #endif | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| // TAS400_report
 | ||||
| // Report dinamico per visualizzare file di testo AS400
 | ||||
| // TAS400_report										 //
 | ||||
| // Report dinamico per visualizzare file di testo AS400  //
 | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| class TAS400_report : public TReport | ||||
| @ -27,8 +27,8 @@ public: | ||||
| }; | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| // TLog_report
 | ||||
| // Report per visualizzare file di log
 | ||||
| // TLog_report											 //
 | ||||
| // Report per visualizzare file di log					 //
 | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| class TLog_report : public TReport | ||||
| @ -56,4 +56,17 @@ public: | ||||
|   TLog_report(const char* title = "", const char* name = "bagn010a"); | ||||
| }; | ||||
| 
 | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| // Report senza maschera								 //
 | ||||
| ///////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| class TProgram_report : public TReport | ||||
| { | ||||
| protected: | ||||
|   virtual bool use_mask() { return false; } | ||||
| 
 | ||||
| public: | ||||
| 	TProgram_report() {} | ||||
| }; | ||||
| 
 | ||||
| #endif | ||||
|  | ||||
| @ -643,6 +643,19 @@ public: | ||||
|   // @cmember Ritorna l'ennesima data
 | ||||
|   bool get(int n, TDate& tok) const; | ||||
| 
 | ||||
|   // @cmember Ritorna il prossimo token
 | ||||
|   bool get(TString& tok) const { return get(-1, tok);} | ||||
|   // @cmember Ritorna il prossimo char
 | ||||
|   bool get(char& tok) const { return get(-1, tok);} | ||||
|   // @cmember Ritorna il prossimo int
 | ||||
|   bool get(int& tok) const { return get(-1, tok);} | ||||
|   // @cmember Ritorna il prossimo long
 | ||||
|   bool get(long& tok) const { return get(-1, tok);} | ||||
|   // @cmember Ritorna il prossimo real
 | ||||
|   bool get(real& tok) const { return get(-1, tok);} | ||||
|   // @cmember Ritorna il prossimo data
 | ||||
|   bool get(TDate& tok) const { return get(-1, tok);} | ||||
| 
 | ||||
|   // @cmember Ritorna la posizione dell'item s
 | ||||
|   int get_pos(const char* s); | ||||
|   // @cmember Ritorna la posizione dell'item s
 | ||||
|  | ||||
| @ -8,6 +8,7 @@ | ||||
| #define BROWSEFILE      BR | ||||
| #define BUTTON          BU | ||||
| #define CHECKTYPE       CH | ||||
| #define CLIENT			CL | ||||
| #define COPY            CO | ||||
| #define DATE            DA | ||||
| #define DISPLAY         DI | ||||
| @ -37,13 +38,16 @@ | ||||
| #define PAGE            PA | ||||
| #define PICTURE         PI | ||||
| #define PROMPT          PR | ||||
| #define PROPERTY	    PR | ||||
| #define RADIOBUTTON     RA | ||||
| #define RUN             RU | ||||
| #define SEARCH          SE | ||||
| #define SELECT          SE | ||||
| #define SLIDER			SL | ||||
| #define STRING          ST | ||||
| #define SHEET           SH | ||||
| #define TEXT            TE | ||||
| #define TREELIST		TL | ||||
| #define TREE            TR | ||||
| #define USE             US | ||||
| #define VALIDATE        VA | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user