Re: Euphoria 4.0.1
- Posted by Vinoba Mar 12, 2011
- 2753 views
We're getting close to the planned release of Euphoria 4.0.1 (about three weeks away)....
If anyone has any other issues, now is the time to speak up, so that we might be able get a fix .....
Matt
Matt:
1. The facility in Math to be able to use a single value against a sequence can only be accomplished via use of Object type on both sides of the Math function. Is there no other way of allowing a sequence against a single value? In other words, can we not allow the low level functions themselves decide that one side is a sequence and the other a single element and automatically execute appropriately?
2. How do we convert a single element value to a sequence?
I am posting examples of the above two situations as treated by APL. This might have been considered and discarded by RC years ago. Anyway, I thought I would try and find out.
⍝ Examples start here.
A ← ⍳10 ⍝ here we create a sequence of 1 to 10
A ⍝ Show A
1 2 3 4 5 6 7 8 9 10
A รท 2 ⍝ here we divide a sequence by a single value 2 ( a scalar)
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
B ← 43.89
B
43.89
⍴ B ⍝ Shape of B is a null
C ← ,B ⍝ Ravel function (,) Convert from single to sequence and store in C
⍴ C ⍝ Shape of C is a one element sequence
1
⍝ Examples end here.
Forked into: Math with sequences and single values