[Xapian-tickets] [Xapian] #800: Supporting sub-routine in OmegaScript
Xapian
nobody at xapian.org
Wed Jan 22 07:30:23 GMT 2020
#800: Supporting sub-routine in OmegaScript
--------------------------+-------------------------------
Reporter: Gaurav Arora | Owner: Olly Betts
Type: defect | Status: new
Priority: normal | Milestone:
Component: Other | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
--------------------------+-------------------------------
Description changed by Gaurav Arora:
Old description:
> I was wondering why does OmegaScript have a way to define a sub-routine
> which can be called multiple times to avoid repetition while writing
> omegascript template.
>
> For example, if have a subroutine which needs to be executed multiple
> times. it would be interesting to define a subroutine which can be used
> multiple times and probably make writing omega-script easy.
>
> ```
> $function{$list{$map{$opt{ARGUMENT1}, $lower{$_}, , .}, ARGUMENT1}
> ```
> So this will define a subroutine. We can call this and this will get a
> value and the apply map and list. This might be required multiple times.
> Hence defining sub-routine might be more convenient than copy-pasting
> same code multiple times.
>
> Is there a reason why it cannot be supported in OmegaScript?
New description:
I was wondering why does OmegaScript have a way to define a sub-routine
which can be called multiple times to avoid repetition while writing
omegascript template.
For example, if have a subroutine which needs to be executed multiple
times. it would be interesting to define a subroutine which can be used
multiple times and probably make writing omega-script easy.
{{{
$function{$list{$map{$opt{ARGUMENT1}, $lower{$_}, , .}, ARGUMENT1}
}}}
So this will define a subroutine. We can call this and this will get a
value and the apply map and list. This might be required multiple times.
Hence defining sub-routine might be more convenient than copy-pasting same
code multiple times.
Is there a reason why it cannot be supported in OmegaScript?
--
--
Ticket URL: <https://trac.xapian.org/ticket/800#comment:1>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list