[Cuis-dev] Declaring undeclared variables inside block

Eric Brandwein brandweineric at gmail.com
Thu Dec 12 20:38:49 PST 2019


Hi all,

In the current image there's a bug when declaring undeclared temporary
variables inside a block. This one has two related consequences:
1. If the block has no temporaries, but it does have two $| in the
temporary declaration part, then it declares the missing temporary in a new
set of $|. You can reproduce this one by saving this method:

test
     [|| var _ 'var']

and selecting "declare block-local temp" in the popup that appears.

2. If the block has temporaries, but the last temporary declared doesn't
have a space after it, it declares the new temporary right after that one,
without a space in between. You can reproduce this one by saving this
method:

test
     [ | var1| var2 _ 'var']

and again selecting "declare block-local temp" in the popup that appears.

Attached is a ChangeSet that solves both issues. Comments are very welcome.

Cheers,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20191213/2d5e7969/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3970-DeclareUndeclaredInBlockFix-EricBrandwein-2019Dec12-23h47m-EB.1.cs.st
Type: application/vnd.sailingtracker.track
Size: 6326 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20191213/2d5e7969/attachment-0001.bin>


More information about the Cuis-dev mailing list