Hello Derive users,
I wrote the following small program
InputMode :=Word
p1(l) :=
PROG
(p := NEXT_PRIME(RANDOM(1)·10^(l/2)),
q := NEXT_PRIME(RANDOM(1)·10^(l/2)),
m := p·q,
n := (p - 1)·(q - 1),
RETURN [p, q, m, n])
and got an error message "unerwartetes Begrenzungszeichen" i.e. "unexpected
limitation mark" , the cursor placed between the m and the comma in the
returned vector.
I wrote a second program
p2(l) :=
PROG
(a := l + 1,
b := l - 1,
c := a·b,
d := (a - 1)·(b - 1),
RETURN [a, b, c, d])
and didn't get an error message.
Then I copied the expressions for p and q step by step from p1 to p2 and
named the program p3.
p3(l) := PROG
(a := NEXT_PRIME(RANDOM(1)·10^(l/2)),
b := NEXT_PRIME(RANDOM(1)·10^(l/2)),
c := a·b,
d := (a - 1)·(b - 1),
RETURN [a, b, c, d])
No error message.
Next I replaced in p1 p,q,m,n by other characters: no error messages.
Then I tried to use the original characters p,q,m,n: error message.
I tried the m for one of the other variables: error message.
Derive doesn't like the m. Why?
Volker
|