El sáb., 6 oct. 2018 a las 12:16, ToddAndMargo via perl6-users (<
perl6-us...@perl.org>) escribió:

> On 10/6/18 2:01 AM, JJ Merelo wrote:
> > I don't know exactly what you mean by a reference pointer. If you mean a
> > pointer, there's no such thing as a pointer, although there is some way
> > to represent pointers in the NativeCall interface (which is properly
> > Rakudo) https://docs.perl6.org/language/traits#index-entry-CPointer.
> > There are no references either, as such. You can bind a variable to
> > another, but there's no special syntax for that.
> >
> > --
> > JJ
>
> Hi JJ,
>
> This is what they look like in Perl 5:
>
> sub GetOldRev ( $$$$$$ ) {
>        # Incomming:
>        my $Extension        = $_[1];
>        my $WorkingDirectory = $_[2];
>        my $CallingFunction  = $_[3];
>
>        # Outgoing.  Note: these are reference pointers to
>        #                  the calling variables
>        #                  do not pass constants ("") to them
>
>        my $BaseTagPtr     = \$_[0];
>        my $OldRevPtr      = \$_[4];  $$OldRevPtr = -9999;
>        my $OldFileNamePtr = \$_[5];  $$OldFileNamePtr = "";
>
> I will be happy if I never have to see a Reference Pointer ever again.
>

I know, I've been using Perl since circa 1993 and pointers since they came
out in Perl 5 (if memory serves). No, we don't have that in Perl 6,
explicitly so.
-- 
JJ

Reply via email to