1 |
Scalars are either numbers or a string of characters as in C although in both cases there are significant if "second-order" differences
-
numbers and strings are not typed separately
-
Note Perl is "safer" than JavaScript in this regard and it is very rare that numbers and strings are confused
|
2 |
Numbers are stored internally as integers if this represents them adequately -- otherwise as double precision numbers
-
Perl and the runtime system make certain that this is transparent to user
-
Wolfram's SMP (the forerunner of Mathematica) at Caltech (which I worked on) also made the more extreme choice of everything being double precision
-
For example 1, 5.0, 4.5E23, and 7.45 E-15, are all numbers
|
3 |
Octal and Hexadecimal numbers are allowed with
-
O377 (initial zero) assumed to be Octal and so equal to 255 decimal
-
OX or Ox reprepresents hexadecimal with letters A to F corresponding to numbers 10 to 15 as normal. OXFF is hex FF or also 255 decimal
|