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

Edit detail for #188 the do instruction doesn't display any result revision 1 of 1

1
Editor:
Time: 2007/11/17 22:05:05 GMT-8
Note: This is intended behaviour

changed:
-
\begin{axiom}
do 
  1
  2
\end{axiom}

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

------------------<br>
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.
\begin{axiom}
do
  1
  2
%
do i for i in 1..3
%
x:=do [i for i in 1..3]
x
1;
2;
%
\end{axiom}

From unknown Fri Jul 1 06:12:48 -0500 2005
From: unknown
Date: Fri, 01 Jul 2005 06:12:48 -0500
Subject: 
Message-ID: <20050701061248-0500@page.axiom-developer.org>

I need the do command for tests with => in interpret input.
\begin{axiom}
1=2 => 3
2=2 => 4
\end{axiom}
Isn't right.
\begin{axiom}
do 
  1=2 => 3
  2=2 => 4
\end{axiom}
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.

From unknown Fri Jul 1 08:02:35 -0500 2005
From: unknown
Date: Fri, 01 Jul 2005 08:02:35 -0500
Subject: do expressions in Aldor
Message-ID: <20050701080235-0500@page.axiom-developer.org>

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

From kratt6 Fri Aug 19 03:18:05 -0500 2005
From: kratt6
Date: Fri, 19 Aug 2005 03:18:05 -0500
Subject: This is intended behaviour
Message-ID: <20050819031805-0500@page.axiom-developer.org>

Status: open => rejected 


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

axiom
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.

axiom
do
  1
  2
Type: PositiveInteger?
axiom
%

\label{eq1}2(1)
Type: PositiveInteger?
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;
Type: PositiveInteger?
axiom
2;
Type: PositiveInteger?
axiom
%

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

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)
Type: PositiveInteger?

Isn't right.

axiom
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