7fd59977 |
1 | -- File: OSD_Real2String.cdl |
2 | -- Created: Fri Jan 25 12:55:44 2002 |
3 | -- Author: doneux <doneux@samcef.com> |
4 | |
7fd59977 |
5 | class Real2String from OSD |
6 | |
7 | ---Purpose: Convertion of CString to Real and reciprocally |
8 | |
9 | is |
10 | |
11 | Create |
12 | returns Real2String from OSD; |
13 | |
14 | RealToCString(me; |
15 | aReal: Real; |
16 | aString:out PCharacter) |
17 | returns Boolean ; |
18 | ---Purpose: |
19 | -- Converts aReal into aCstring in exponential format with maximum |
20 | -- 17 digits. The size of the destination string must be sufficient (at least 23 characters) |
21 | -- The decimal separator account for locale setting, but |
22 | -- neither thousand separator nor grouping of digits in the output string. |
23 | -- |
24 | |
25 | CStringToReal(me: in out; |
26 | aString: CString; |
27 | aReal: out Real) returns Boolean ; |
28 | ---Purpose: |
29 | -- Converts aCstring representing a real. The first occurence of the decimal separator |
30 | -- (comma or period) defines it values for further readings. |
31 | -- Neither thousand separator nor grouping of digits are allowed in the CString |
32 | |
33 | fields |
34 | |
35 | myReadDecimalPoint: Integer from Standard; |
36 | myLocalDecimalPoint: Integer from Standard; |
37 | |
38 | end Real2String; |