Re: goto return ?



On Fri, Nov 24, 2006 at 05:37:35PM -0600, JupiterHost.Net wrote:

In a function I can do this:

# stuff here

if($whatever, @ret) {
one();
two();
goto &CORE::return; # this is pseudo code that does not work but
illustrates the idea of the goal
}

# keep going since that function didn't return.

Say you have to do that expect same logic ten times, it'd be nice

More than twice I think I'd expect some sort of loop.

instead of fifty of the exact same lines to have ten lines by do ing this:

# stuff here

do_one_then_two_then_return_if($whatever);

do { one_then_two; return } if $whatever;

one_then_two, return if $whatever;

if ($whatever) { one_then_two; return }

$whatever and one_then_two, return;

or maybe the return is conditional:

return if $whatever && one_then_two;

$whatever and one_then_two and return;

or maybe you want to return a value:

return one_then_two if $whatever;

or any of a number of variations.

# keep going since that function didn't return.

Just need to figure you how to get the functionality that:

goto &CORE::return;

feels like it should do assuming I knew how to reference return...

nah

--
Paul Johnson - paul@xxxxxxxx
http://www.pjcj.net
.



Relevant Pages

  • Re: Evaluating a MERGEFIELD = "RET"
    ... the merge field into the bookmark value. ... reference is treated as just a reference to the datafile if you don't use the ... by having a bookmark called RET in your document). ... by just printing "{MERGEFIELD AdmitType}" in the form letter. ...
    (microsoft.public.word.vba.general)
  • [PATCH 2/3] arch/powerpc/sysdev: Add missing of_node_put
    ... So any error handling code thereafter should ... This is taken care of in the case where there is a goto ... the reference count again in the argument to irq_alloc_host so that it can ... return ret; ...
    (Linux-Kernel)
  • Re: Make a copy of structure within of a HoH?
    ... > Kindly consider this simplified script which illustrates my question ... reference, rather than assigning a scalar to a hash: ...
    (comp.lang.perl.misc)
  • RE: sumif with two conditions,current financial year date
    ... This illustrates how to reference the cell for the start and end of the ... This illustrates another method of referenceing the dates. ... I need funtion to sum John's Current year total Amout value,inthis case the ...
    (microsoft.public.excel.worksheet.functions)
  • RE: sumif with two conditions,current financial year date
    ... Shane Devenshire wrote: ... This illustrates how to reference the cell for the start and end of the ... This illustrates another method of referenceing the dates. ...
    (microsoft.public.excel.worksheet.functions)