Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

je::number(3pm) [debian man page]

JE::Number(3pm) 					User Contributed Perl Documentation					   JE::Number(3pm)

NAME
JE::Number - JavaScript number value SYNOPSIS
use JE; use JE::Number; $j = JE->new; $js_num = new JE::Number $j, 17; $perl_num = $js_num->value; $js_num->to_object; # returns a new JE::Object::Number DESCRIPTION
This class implements JavaScript number values for JE. The difference between this and JE::Object::Number is that that module implements number objects, while this module implements the primitive values. Right now, this module simply uses Perl numbers underneath for storing the JavaScript numbers. It seems that whether Perl numbers are in accord with the IEEE 754 standard that ECMAScript uses is system-dependent. If anyone requires IEEE 754 compliancy, a patch would be welcome. :-) The "new" method accepts a global (JE) object and a number as its two arguments. If the latter is an object with a "to_number" method whose return value isa JE::Number, that object's internal value will be used. Otherwise the arg itself is used. (The precise details of the behaviour of "new" when the second arg is a object are subject to change.) It is numified Perl-style, so 'nancy' becomes NaN and 'information' becomes Infinity. The "value" method produces a Perl scalar. The "0+" numeric operator is overloaded and produces the same. Stringification and boolification are overloaded and produce the same results as in JavaScript The "typeof" and "class" methods produce the strings 'number' and 'Number', respectively. SEE ALSO
JE JE::Types JE::Object::Number perl v5.14.2 2012-03-18 JE::Number(3pm)

Check Out this Related Man Page

PPI::Token::Number(3pm) 				User Contributed Perl Documentation				   PPI::Token::Number(3pm)

NAME
PPI::Token::Number - Token class for a number SYNOPSIS
$n = 1234; # decimal integer $n = 0b1110011; # binary integer $n = 01234; # octal integer $n = 0x1234; # hexadecimal integer $n = 12.34e-56; # exponential notation ( currently not working ) INHERITANCE
PPI::Token::Number isa PPI::Token isa PPI::Element DESCRIPTION
The "PPI::Token::Number" class is used for tokens that represent numbers, in the various types that Perl supports. METHODS
base The "base" method is provided by all of the ::Number subclasses. This is 10 for decimal, 16 for hexadecimal, 2 for binary, etc. literal Return the numeric value of this token. CAVEATS
Compared to Perl, the number tokenizer is too liberal about allowing underscores anywhere. For example, the following is a syntax error in Perl, but is allowed in PPI: 0_b10 TO DO
- Treat v-strings as binary strings or barewords, not as "base-256" numbers - Break out decimal integers into their own subclass? - Implement literal() SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2011-02-26 PPI::Token::Number(3pm)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Counting The Number Of Duplicate Lines In a File

Hello. First time poster here. I have a huge file of IP numbers. I am trying to output only the class b of the IPs and rank them by most common and output the total # of duplicate class b's before the class b. An example is below: 12.107.1.1 12.107.9.54 12.108.3.89 12.109.109.4 12.109.6.3 ... (2 Replies)
Discussion started by: crunchtime
2 Replies

2. UNIX for Dummies Questions & Answers

comparing numbers in a file

Hello, I'm searching for a quick method to read numeric values from a file or a defined variable and identifying the largest number. For instance if the following numbers are in a file or defined to a variable: 09192007 09202007 09182007 09172007 09162007 What "short" method could be used to... (7 Replies)
Discussion started by: dusk2dawn
7 Replies

3. UNIX for Dummies Questions & Answers

Provide a count of files

Hi, I'm a unix newbie and need your help. I need to get a count of files on our server. Number of .html files, Number of .pdf's, and Number of .ppt. I tried: find . -type f | wc -l but it only give me a total count. Thanks. (5 Replies)
Discussion started by: keymind
5 Replies

4. Shell Programming and Scripting

Number range for SSNs

Hi All. I have a file that has an ID Number field....some of the ID Numbers are actual SSNs. ...does anyone know the range that SSNs may be...this is what I have found so far poking around SSN info sites.... greater than 001-01-0000 and less than 770-00-0000. Does anyone know this to be... (1 Reply)
Discussion started by: lyoncc
1 Replies