Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 312 Details for
Bug 9203
Compare/diff performance is bad
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
aaa
postfix.hs (text/plain), 542 bytes, created by
Edward Lam
on 2002-02-06 15:25:41 EST
(
hide
)
Description:
aaa
Filename:
MIME Type:
Creator:
Edward Lam
Created:
2002-02-06 15:25:41 EST
Size:
542 bytes
patch
obsolete
>import Stack > >postfix :: String -> Float >postfix s = parse s stack where stack = newStack > >parse :: String -> Stack Float -> Float >parse [] stack = fst (pop stack) >parse (ch:s) stack > | ('0' <= ch) && (ch <= '9') = parse s (push x stack) > | otherwise = parse s (push n s2) > where x = fromInt (ord ch - ord '0') > (n1, s1) = pop stack > (n2, s2) = pop s1 > n = eval ch n1 n2 > >eval :: Char -> Float -> Float -> Float >eval ch n1 n2 > | ch == '+' = n2 + n1 > | ch == '-' = n2 - n1 > | ch == '*' = n2 * n1 > | ch == '/' = n2 / n1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9203
: 312