Multiple declarations with assignments

12 views
Skip to first unread message

Sid Andal

unread,
Feb 1, 2025, 10:52:43 AM2/1/25
to FriCAS - computer algebra system
The two functions Test_1() and Test_2() differ only in their
declarations. However the first one runs ok, while the second
fails and drops into the debug mode:

(1) -> )r test
Test_1() ==
   A : INT := 1
   B : INT := 2
   C : INT := 3
   output("")
   output("A:", A)
   output("B:", B)
   output("C:", C)
   output("")
 

Test_2() ==
   (A, B, C) : INT := (1, 2, 3)
   output("")
   output("A:", A)
   output("B:", B)
   output("C:", C)
   output("")


(3) -> Test_1()
   Compiling function Test_1 with type () -> Void

   A: 1
   B: 2
   C: 3

(4) -> Test_2()
   Compiling function Test_2 with type () -> Void

debugger invoked on a SIMPLE-CONDITION in thread
#<THREAD "main thread" RUNNING {10004F05B3}>:
  break

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE] Return from BREAK.
  1: [ABORT   ] Exit from the current thread.

(|compTran1| (LETT (|Tuple| A B C) (QUOTE UNINITIALIZED_VARIABLE) |Test_2|))
   error finding frame source: Bogus form-number: the source file has probably
                               changed too much to cope with.
   source: NIL
0]


Thanks,

SWA

Waldek Hebisch

unread,
Feb 4, 2025, 5:54:07 AM2/4/25
to fricas...@googlegroups.com
On Sat, Feb 01, 2025 at 07:52:42AM -0800, Sid Andal wrote:
> The two functions Test_1() and Test_2() differ only in their
> declarations. However the first one runs ok, while the second
> fails and drops into the debug mode:

<snip>

> Test_2() ==
> (A, B, C) : INT := (1, 2, 3)
> output("")
> output("A:", A)
> output("B:", B)
> output("C:", C)
> output("")

<snip>

> (4) -> Test_2()
> Compiling function Test_2 with type () -> Void
>
> debugger invoked on a SIMPLE-CONDITION in thread
> #<THREAD "main thread" RUNNING {10004F05B3}>:
> break
>
> Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
>
> restarts (invokable by number or by possibly-abbreviated name):
> 0: [CONTINUE] Return from BREAK.
> 1: [ABORT ] Exit from the current thread.
>
> (|compTran1| (LETT (|Tuple| A B C) (QUOTE UNINITIALIZED_VARIABLE) |Test_2|))
> error finding frame source: Bogus form-number: the source file has
> probably
> changed too much to cope with.
> source: NIL
> 0]

Thanks for info, I pushed a fix to the trunk.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages