login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Submitted by : (unknown) at: 2007-11-17T22:05:05-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

fricas
(1) -> do 
  1
  2
Type: PositiveInteger?

The result is a PositiveInteger?. I don't read the value 2

------------------
That is a feature?? (perhaps useful just for its side effects; and do seems not documented -- it is equivalent to adding semicolons to each line of the pile, without the type info outputted on each line except the last). You need to explicitly ask to display a value.

fricas
do
  1
  2
Type: PositiveInteger?
fricas
%

\label{eq1}2(1)
Type: PositiveInteger?
fricas
do i for i in 1..3
Type: Tuple(PositiveInteger?)
fricas
%

\label{eq2}\left[ 1, \: 2, \: 3 \right](2)
Type: Tuple(PositiveInteger?)
fricas
x:=do [i for i in 1..3]
Type: List(PositiveInteger?)
fricas
x

\label{eq3}\left[ 1, \: 2, \: 3 \right](3)
Type: List(PositiveInteger?)
fricas
1;
Type: PositiveInteger?
fricas
2;
Type: PositiveInteger?
fricas
%

\label{eq4}2(4)
Type: PositiveInteger?

I need the do command for tests with => in interpret input.
fricas
1=2 => 3
Type: Void
fricas
2=2 => 4

\label{eq5}4(5)
Type: PositiveInteger?

Isn't right.

fricas
do 
  1=2 => 3
  2=2 => 4
Type: PositiveInteger?

is better. I don't understand why the do command runs with a semicolon ; at the end. If I don't want any display I add a semicolon, if not I get the result.

do expressions in Aldor --unknown, Fri, 01 Jul 2005 08:02:35 -0500 reply
Quoted from the Aldor User Guide at http://www.aldor.org/docs/HTML/chap5.html#7

The do expression evaluates E and discards the computed value, so that the do expression returns no value.

do E

This is intended behaviour --kratt6, Fri, 19 Aug 2005 03:18:05 -0500 reply
Status: open => rejected




  Subject:   Be Bold !!
  ( 15 subscribers )  
Please rate this page: