Re: Integer data type

2008-07-05 Thread Rob Dixon
howa wrote: > On 7月5日, 上午4時56分, [EMAIL PROTECTED] (Rob Dixon) wrote: >> A Perl scalar value (including array and hash elements) can have more than >> one >> type simultaneously. Why do you think you need to know what type of value is >> being held? >> >> Rob > > hello, > > can you show an exampl

Re: Integer data type

2008-07-05 Thread John W. Krahn
howa wrote: On 7$B7n(B5$BF|(B, $B>e8a(B4$B;~(B56$BJ,(B, [EMAIL PROTECTED] (Rob Dixon) wrote: A Perl scalar value (including array and hash elements) can have more than one type simultaneously. Why do you think you need to know what type of value is being held? can you show an exampl

Re: Integer data type

2008-07-05 Thread howa
On 7月5日, 上午4時56分, [EMAIL PROTECTED] (Rob Dixon) wrote: > A Perl scalar value (including array and hash elements) can have more than one > type simultaneously. Why do you think you need to know what type of value is > being held? > > Rob hello, can you show an example of "more than one type simu

Re: Integer data type

2008-07-04 Thread John W. Krahn
Roy M wrote: Hi Hello, On Jul 4, 11:19 am, [EMAIL PROTECTED] (John W. Krahn) wrote: perldoc perlnumber btw, are there any typeof command so I can check the data type of a scalar? You can use ref(): You can think of "ref" as a "typeof" operator. perldoc -f ref Also Scalar::Util ha

Re: Integer data type

2008-07-04 Thread Rob Dixon
Roy M wrote: > Hi > > On Jul 4, 11:19 am, [EMAIL PROTECTED] (John W. Krahn) wrote: >> perldoc perlnumber >> > > Thanks, > > btw, are there any typeof command so I can check the data type of a > scalar? A Perl scalar value (including array and hash elements) can have more than one type simultane

Re: Integer data type

2008-07-04 Thread Yitzchok Good
On Fri, Jul 4, 2008 at 3:29 AM, Roy M <[EMAIL PROTECTED]> wrote: > Hi > > On Jul 4, 11:19 am, [EMAIL PROTECTED] (John W. Krahn) wrote: >> perldoc perlnumber >> > > Thanks, > > btw, are there any typeof command so I can check the data type of a > scalar? > > Thanks Scalar /is/ the variable type. An

Re: Integer data type

2008-07-04 Thread Roy M
Hi On Jul 4, 11:19 am, [EMAIL PROTECTED] (John W. Krahn) wrote: > perldoc perlnumber > Thanks, btw, are there any typeof command so I can check the data type of a scalar? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.o

Re: Integer data type

2008-07-03 Thread Roy M
Hi, On Jul 4, 9:53 am, [EMAIL PROTECTED] (Yitzle) wrote: > OK. That wasn't clear. Perl doesn't have an int and string and char > datatypes per say. Perl has a scalar and an array and a hash. > Perl does this dynamic casting to int or string as needed. Yes, but even for dynamic casting During ad

Re: Integer data type

2008-07-03 Thread John W. Krahn
Roy M wrote: Conside the following codes: use POSIX; print LONG_MAX, "\n"; my $num = 994; print $num; Why $num is bigger than LONG_MAX ? Because the value in $num is a floating point number. perldoc perlnumber John -- Perl isn't a toolbox, but a small machine shop where you can

Re: Integer data type

2008-07-03 Thread yitzle
On Thu, Jul 3, 2008 at 9:47 PM, yitzle <[EMAIL PROTECTED]> wrote: > On Thu, Jul 3, 2008 at 11:03 AM, Roy M <[EMAIL PROTECTED]> wrote: >> Conside the following codes: >> >> use POSIX; >> >> print LONG_MAX, "\n"; >> >> my $num = 994; >> print $num; >> >> >> Why $num is bigger than LONG_MAX ?

Re: Integer data type

2008-07-03 Thread yitzle
On Thu, Jul 3, 2008 at 11:03 AM, Roy M <[EMAIL PROTECTED]> wrote: > Conside the following codes: > > use POSIX; > > print LONG_MAX, "\n"; > > my $num = 994; > print $num; > > > Why $num is bigger than LONG_MAX ? It is a string maybe? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Integer data type

2008-07-03 Thread Roy M
Conside the following codes: use POSIX; print LONG_MAX, "\n"; my $num = 994; print $num; Why $num is bigger than LONG_MAX ? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/