Consider this Perl 6 code:
sub refinc($var) {
my $myvar = $var;
$myvar += 1;
}
If you pass an integer in here, it should do nothing. However, if you
pass an object with an overloaded += in, it should have the
side-effect of adding one to that object. It's just a value/re
> Yeah, I don't think you can use .local across subs like that. I think
> .local means "local to this sub" and *inner subs aren't closures*. In
> fact, I don't think inner subs are useful for much of anything at all.
The more I read, the more likely I think this is a bug. For example, the note
> Sorry, the example was unnecessarily long.
>
> > After a quick reading of this, I'd have expected the value of "f" at the indicated
> > point to be 1, but instead it's 2.
>
> .local int f
> .sub _main
> .local int x
> .sub _foo1
> f=1
> x=2
>
Gordon Henriksen wrote:
The most fundamental feature throwing an exception is that it transfers
program execution from the call site. Allowing the caller to resume
execution at that site is a very dangerous form of action at a distance.
I think you'd be better off a giving the caller an explicit wa
Sorry, the example was unnecessarily long.
> After a quick reading of this, I'd have expected the value of "f" at the indicated
> point to be 1, but instead it's 2.
.local int f
.sub _main
.local int x
.sub _foo1
f=1
x=2
call _foo2
After a quick reading of this, I'd have expected the value of "f" at the indicated
point to be 1, but instead it's 2.
.local int f
.sub _main
.local int x
.sub _foo1
f=1
x=2
call _foo2
end
.end
.sub _f
Dave Whipp <[EMAIL PROTECTED]> wrote:
> C does do templates, sort-of:
> #define STACK_TYPE int
> #define STACK_MAX_SIZE 1024
> #include stack_template_decl.h
> #include stack_template_impl.h
> #undef STACK_TYPE
> #undef STACK_MAX_SIZE
> There can be some issues debugging this stuff though:
And
Todd R Wade (via RT) wrote:
Please read Subject: Timely destruction and TRACE_SYSTEM_AREAS
Todd W.
leo
The 3 stacks using stacks.c (Control, Pad, and User) are now COWed per
chunk.
The main difference in stack usage caused by this change is: Its only
safe to walk a stack from top down via the prev pointers. If we ever
need to go up from base, marking a stack COW would need duplication of
the lin
The most fundamental feature throwing an exception is that it transfers
program execution from the call site. Allowing the caller to resume
execution at that site is a very dangerous form of action at a distance.
I think you'd be better off a giving the caller an explicit way to
inhibit throwing a
"Matt Fowles" <[EMAIL PROTECTED]>
> Were this C++ I would say that we could write a single general purpose
> stack and use template meta-programming to avoid the overhead. Is there
> a similar solution available in C?
>
> My instincts tell me that this solution will be dirty to the tune of
> massi
# New Ticket Created by Todd R Wade
# Please include the string: [perl #22823]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt2/Ticket/Display.html?id=22823 >
Here is the result of the io tests and the test summary. Below that is
the contents of .
12 matches
Mail list logo