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 (10 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

axiom
do 
  1
  2

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.

axiom
do
  1
  2
axiom
%

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

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

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

\label{eq4}2(4)

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

\label{eq5}4(5)

Isn't right.

axiom
do 
  1=2 => 3
  2=2 => 4

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 !!
  ( 13 subscribers )  
Please rate this page: