Chris,
The idea of program-folds is that AMRITA does not need to provide
a command to do everything. For if it can't do something, you have
the option to drop into a specialist fold, as in:
fold::perl { print date
($sec,$min,$hour,$mday,$mon,$year,$wday,
$yday,$isdst)=localtime(time);
printf "%4d-%02d-%02d %02d:%02d:%02d\n",
$year+1900,$mon+1,$mday,$hour,$min,$sec;
}
You could also write:
tokenpath + <- %perl::
fold::perl { print date
($sec,$min,$hour,$mday,$mon,$year,$wday,
$yday,$isdst)=localtime(time);
}
echo $hour,$min,$sec
so that AMRITA can access the Perlrl varibable implicitly, or
you could use an explicit push pull mechanism:
fold::perl { print date
my ($sec,$min,$hour,$mday,$mon,$year,$wday,
$yday,$isdst)=localtime(time);
$amrita->set_token('hour',$hour);
$amrita->set_token('min',$min);
$amrita->set_token('sec',$sec);
}
echo $hour,$min,$sec
James
>
> --
>
> You received this message because you are subscribed to the Google Groups "amrita-ebook" group.
> To post to this group, send email to
amrita...@googlegroups.com.
> To unsubscribe from this group, send email to
amrita-ebook...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/amrita-ebook?hl=en.
>
>