Hello all, I have a list of reports for stores that are numbered like:
s001845,s000022,s198490,s020048,s002385
however the users are displaying the reports as:
1845,22,198490,20048,2385
It isn't real critical but I would like to associate them so they are the same. And since the users are... (2 Replies)
Hi all,
Can anybody help me out to write a program in perl to remove O and preceeding zeros.
for eg input is O0000123089 - output 123089
Thanks
Mahalakshmi.A (10 Replies)
Hi,
I have a file like this
(ADD_MONTHS((Substr(Trim(BOTH FROM Translate(Maximum(closeDa
------------------------------------------------------------
2007-06-30 00:00:00
I have a requirement where i need just the date.
When i do: tail -1... (2 Replies)
Hello, I am trying to write a script that will calculate the amount of data remaining in a storage volume. I'm running Tru64 Unix version 5.1B patch kit 6. The script is being run against an AdvFS domain. I am programming in Korn Shell version M-11/16/88f.
The basic idea is that I want to run df... (3 Replies)
Hi All
I want to delete trailing zeros from varible.
ex:
if variable value is 1234.567000 result as 1234.567
if variable has 1234.0000 result as 1234
if variable as abcd.fgh result as abcd.fgh
Can somone give me a solution using awk? (16 Replies)
Hello All,
I have a csv file with 3 columns. The file which looks like this
47850000,100,233
23560000,10000,456
78650000,560000,54
34000000,3456,3
The first column has 4 trailing zeros. I have to remove 4 trailing zeroes from 1st field. The output file should appear as follows.
... (12 Replies)
Hi
I am trying to remove trailing space from a string.
value=${value%% }
It is not working. What might be the issue with the above snippet. (7 Replies)
I have some strings such as
ABC1
ABC2
TYFASDD12
They will only have letters and numbers. In each case I want to remove the last digit? The lengths will vary. So a hard coded substr won't work. What do I do?
if it doesn't end in a number, I don't want to remove any characters. (6 Replies)
Hi,
I am trying to remove trailing zeros from numbers in a csv file.
CSV Input : 0.5000,abc,2.00,2.400,285.850,285a.850,205.180800,mno000,a0b0,2.860
Expected Output :
.5,abc,2,2.4,285.85,285a.850,205.1808,mno000,a0b0,2.86
Can you please help.
Thanks. (11 Replies)
Discussion started by: manubatham20
11 Replies
LEARN ABOUT LINUX
fixed
fixed(3erl) Erlang Module Definition fixed(3erl)NAME
fixed - the corba fixed type
DESCRIPTION
This module contains functions that gives an interface to the CORBA fixed type.
The type Fixed used below is defined as:
-record(fixed, {digits, scale, value}).
where digits is the total amount of digits it consists of and scale is the number of fractional digits. The value field contains the actual
Fixed value represented as an integer. The limitations of each field are:
* Digits - integer(), -1 > Digits < 32
* Scale - integer(), -1 > Scale =< Digits
* Value - integer(), range (31 digits): +/-9999999999999999999999999999999
Since the Value part is represented by an integer, it is vital that the Digits and Scale values are correct. This also means that trailing
zeros cannot be left out in some cases:
* fixed<5,3> eq. 03.140d eq. 3140
* fixed<3,2> eq. 3.14d eq. 314
Leading zeros can be left out.
For your convenience, this module exports functions which handle unary ( - ) and binary ( +-*/ ) operations legal for the Fixed type. Since
a unary + have no effect, this module do not export such a function. Any of the binary operations may cause an overflow (i.e. more than 31
significant digits; leading and trailing zeros are not considered significant). If this is the case, the Digit and Scale values are
adjusted and the Value truncated (no rounding performed). This behavior is compliant with the OMG CORBA specification. Each binary opera-
tion have the following upper bounds:
* Fixed1 + Fixed2 - fixed<max(d1-s1,d2-s2) + max(s1,s2) + 1, max(s1,s2)>
* Fixed1 - Fixed2 - fixed<max(d1-s1,d2-s2) + max(s1,s2) + 1, max(s1,s2)>
* Fixed1 * Fixed2 - fixed<d1+d2, s1+s2>
* Fixed1 / Fixed2 - fixed<(d1-s1+s2) + Sinf ,Sinf >
A quotient may have an arbitrary number of decimal places, which is denoted by a scale of Sinf.
EXPORTS
create(Digits, Scale, Value) -> Result
Types Result = Fixed Type | {'EXCEPTION', #'BAD_PARAM'{}}
This function creates a new instance of a Fixed Type . If the limitations is not fulfilled (e.g. overflow) an exception is raised.
get_typecode(Fixed) -> Result
Types Result = TypeCode | {'EXCEPTION', #'BAD_PARAM'{}}
Returns the TypeCode which represents the supplied Fixed type. If the parameter is not of the correct type, an exception is raised.
add(Fixed1, Fixed2) -> Result
Types Result = Fixed1 + Fixed2 | {'EXCEPTION', #'BAD_PARAM'{}}
Performs a Fixed type addition. If the parameters are not of the correct type, an exception is raised.
subtract(Fixed1, Fixed2) -> Result
Types Result = Fixed1 - Fixed2 | {'EXCEPTION', #'BAD_PARAM'{}}
Performs a Fixed type subtraction. If the parameters are not of the correct type, an exception is raised.
multiply(Fixed1, Fixed2) -> Result
Types Result = Fixed1 * Fixed2 | {'EXCEPTION', #'BAD_PARAM'{}}
Performs a Fixed type multiplication. If the parameters are not of the correct type, an exception is raised.
divide(Fixed1, Fixed2) -> Result
Types Result = Fixed1 / Fixed2 | {'EXCEPTION', #'BAD_PARAM'{}}
Performs a Fixed type division. If the parameters are not of the correct type, an exception is raised.
unary_minus(Fixed) -> Result
Types Result = -Fixed | {'EXCEPTION', #'BAD_PARAM'{}}
Negates the supplied Fixed type. If the parameter is not of the correct type, an exception is raised.
Ericsson AB orber 3.6.20 fixed(3erl)