in reply to Re: Re: Re: Declaring variables - is it legal to do this?
in thread Declaring variables - is it legal to do this?

Well since perl is written in C, there could be unspecified behaviours in Perl itself (ie. having different valid results for the same code with different platforms), but I guess Perl was designed to avoid that.
  • Comment on Re: Re: Re: Re: Declaring variables - is it legal to do this?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Declaring variables - is it legal to do this?
by ambrus (Abbot) on May 16, 2004 at 14:43 UTC

    Of course there are. One example is weather select provides the remaining time, and weather it restarts after a signal. This is system-dependent, and ultimately depends on what the kernel and the C library does.

      I don't see how this is related to unspecified behaviours I was talking about. Here select is clearly system-dependant because it precisely depends on the one provided by the system (and it doesn't depend on C at all, there's no select in C).

        You were talking about system dependencies:

        Well since perl is written in C, there could be unspecified behaviours in Perl itself (ie. having different valid results for the same code with different platforms),

        Platform and system means almost the same here, doesn't it?

        (and it doesn't depend on C at all, there's no select in C).

        What do you mean here "not in C"? Select is a system call, so what it does with the time is an issue of the OS kernel, but the restarting of system calls after signals is handled by the C library IIRC. (Or doesn't it, does the kernel restart syscalls if you say so with sigaction, maybe libc just sets the default behaviour to what you want, I'm not sure).