[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Re: [zzdev] Code Question - XANNI!
- To: zzdev@xxxxxxxxxx
- Subject: Re: [zzdev] Code Question - XANNI!
- From: Andrew Pam <xanni@xxxxxxxxxxxxxxxxx>
- Date: Fri, 2 Oct 1998 16:49:54 +1000
- In-reply-to: <19981003023752.A24931@xxxxxxxxxxxxxx>; from Gossamer on Sat, Oct 03, 1998 at 02:37:52AM +1000
- References: <19981003023752.A24931@xxxxxxxxxxxxxx>
- Reply-to: zzdev@xxxxxxxxxx
On Sat, Oct 03, 1998 at 02:37:52AM +1000, Gossamer wrote:
> Xanni, you've stumped me. Can you translate this into
> simpler code? My brain refuses to unravel the brackets
> today!
Well, I think I can give you an explanation.
> sub view_reset($)
> # Reset dimensions of given cursor
> {
> my ($number) = @_;
This is the cursor number (0 for the "action" cursor, 1 for the "data" cursor)
> my $curs = &get_cursor($number);
$curs is now the cell number of the cursor itself.
> my $index = &get_nextcell($CURSOR_HOME, "+d.1"); # Dimension list
$index is now the cell number of the head of the dimension list.
> $ZZ{$curs = $ZZ{"$curs+d.1"}} = "+$ZZ{$index}";
$curs is now moving along +d.1 to the cell containing the X dimension
of the cursor, and is being assigned poswards in the first dimension on
the dimension list.
> $ZZ{$curs = $ZZ{"$curs+d.1"}} = "+" . $ZZ{$index = $ZZ{"$index+d.2"}};
$curs is now moving +d.1 again to the cell containing the Y dimension
of the cursor, and is being assigned poswards in the next dimension on
the dimension list.
> $ZZ{$curs = $ZZ{"$curs+d.1"}} = "+" . $ZZ{$index = $ZZ{"$index+d.2"}};
$curs is now moving +d.1 again to the cell containing the Z dimension
of the cursor, and is being assigned poswards in the next dimension on
the dimension list.
> $Window_Dirty[$number] = $TRUE;
> }
Finally we mark the affected window as dirty so it will redraw with
the new dimensions.
Hope that helps,
*** Xanni ***
--
mailto:xanni@xxxxxxxxxx Andrew Pam
http://www.xanadu.com.au/ Technical VP, Xanadu
http://www.glasswings.com.au/ Technical Editor, Glass Wings
http://www.sericyb.com.au/sc/ Manager, Serious Cybernetics
P.O. Box 26, East Melbourne VIC 8002 Australia Phone +61 3 96511511