🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bln.comp.lang.opal
2 messages
2 total messages Started by Holger Kinscher Sun, 02 Dec 2001 12:59
warnung
#37
Author: Holger Kinscher
Date: Sun, 02 Dec 2001 12:59
18 lines
1512 bytes
hi!

folgender code

DEF fold(op, e)(<>) == e
DEF fold(op, e)(a :: R)  ==     IF <>?(R) THEN e op a
                                ELSE fold(op, e)(R) op a
                                FI

wird zwar ausgefuehrt,  allerdings werde ich gewarnt:

WARNING [Blatt6.impl at 9.14]: pattern variable e hides constant e'Real:real
WARNING [Blatt6.impl at 10.14]: pattern variable e hides constant 
e'Real:real

weiss jemand, wovor?

cu
Re: warnung
#38
Author: Florian 'FLoh' Lindner
Date: Sun, 02 Dec 2001 21:15
21 lines
1532 bytes
Holger Kinscher wrote:
> DEF fold(op, e)(<>) == e
> DEF fold(op, e)(a :: R)  ==     IF <>?(R) THEN e op a
>                                 ELSE fold(op, e)(R) op a
>                                 FI
> 
> wird zwar ausgefuehrt,  allerdings werde ich gewarnt:
> 
> WARNING [Blatt6.impl at 9.14]: pattern variable e hides constant
> e'Real:real WARNING [Blatt6.impl at 10.14]: pattern variable e hides
> constant e'Real:real
> 
> weiss jemand, wovor?
ja, steht doch da:
du kannst innerhalb von fold nicht auf die "funktion" (weil in opal gibt's 
ja keine globalen konstanten ;-)) e (also 2.718...) nicht zugreifen, weil 
die durch deine variable e verdeckt wird!

cu

FLoh
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads