Search Results

Showing results 1 to 17 of 17
Search took 0.01 seconds.
Search: Posts Made By: Duoas ; Forum: Legacy and Other Languages and child forums
Forum: Legacy and Other Languages Mar 1st, 2008
Replies: 4
Solved: Miranda
Views: 1,573
Posted By Duoas
Miranda has a lot of similarities to Haskell. I can't say for sure that I can help you, but post your question and we'll see.

Even if I can't, there are a lot of knowledgeable Haskell folks here...
Forum: Legacy and Other Languages Feb 21st, 2008
Replies: 8
Views: 3,648
Posted By Duoas
You are getting lost on syntactic sugar.
(define (foo x y z) (+ (- x y) z))
is sugar for:
(define foo (lambda (x y z) (+ (- x y) z)))

Likewise, inside the body of a lambda, using
(define (bar...
Forum: Legacy and Other Languages Feb 14th, 2008
Replies: 8
Views: 3,648
Posted By Duoas
A begin is implied in the body of a lambda.

The problem is that you have to be extra careful to keep data and code separate in scheme. You are mixing the two.

For example, the following is not...
Forum: Legacy and Other Languages Feb 14th, 2008
Replies: 8
Views: 3,648
Posted By Duoas
The same problem?

I see nothing wrong with your code... (I can't test it myself ATM, as I'm just recovering from a system wipe and have yet to reinstall scheme.)

Do you think it might be...
Forum: Legacy and Other Languages Feb 13th, 2008
Replies: 8
Views: 3,648
Posted By Duoas
That shouldn't work at all. Both upgraph and downgraph are defined to take a single argument, but you are passing multiple...

That could be the problem. Make sure also that you aren't calling...
Forum: Legacy and Other Languages Nov 24th, 2007
Replies: 15
Solved: Scheme Help
Views: 3,080
Posted By Duoas
Thanks. Please keep in mind that the OP (and most other readers here) haven't read (nor will they) the R5RS.

The R5RS committee needed a word for a technical thing. They chose poorly (though,...
Forum: Legacy and Other Languages Nov 17th, 2007
Replies: 15
Solved: Scheme Help
Views: 3,080
Posted By Duoas
Just as a random addendum. Above I said you could make your ADT as:
(define (rank card) (car card))
That's fine, but if you really want to wow, forget the fluff and just say:
(define rank car)
...
Forum: Legacy and Other Languages Nov 16th, 2007
Replies: 15
Solved: Scheme Help
Views: 3,080
Posted By Duoas
Of course. You'll need to read up on recursion.

There is a basic principle: if you have a list
(a b c d)
(which, if you remember, is really:
(a . (b . (c . (d . ()))))
and if you can do...
Forum: Legacy and Other Languages Nov 15th, 2007
Replies: 15
Solved: Scheme Help
Views: 3,080
Posted By Duoas
Since a "hand" object is a list of cards, and you want to get a list of cards from a hand, all you need to do is return the hand:
(define (contents hand) hand)
Now, if a "hand" object were...
Forum: Legacy and Other Languages Nov 14th, 2007
Replies: 15
Solved: Scheme Help
Views: 3,080
Posted By Duoas
Yes. A card is a single object. If you want a list of cards, then store a list of cards, not a list of suits and ranks.


(define dead-mans-hand (list
(make-card 13 'spades)
(make-card 13...
Forum: Legacy and Other Languages Nov 14th, 2007
Replies: 15
Solved: Scheme Help
Views: 3,080
Posted By Duoas
There are no procedures in scheme, only functions. Whenever you say define, you are naming an expression that evaluates to something.

Hence, follow along:
(a-card 13 'spades) becomes
(make-card...
Forum: Legacy and Other Languages Oct 28th, 2007
Replies: 13
Views: 5,832
Posted By Duoas
Good question! :-/

I do have to hit it fairly hard, and regularly. Sometimes with a good, heavy bludger. ;)
Forum: Legacy and Other Languages Oct 27th, 2007
Replies: 13
Views: 5,832
Posted By Duoas
Yeah. As far as I am concerned, the computer is there to serve me, not the other way around. ;)

The MS article you linked references only which files may be corrupted for the error to occur....
Forum: Legacy and Other Languages Oct 27th, 2007
Replies: 13
Views: 5,832
Posted By Duoas
If it is from any of the DOS 6.x series or Windows 9x then it is QBasic 1.1. However, the editor (EDIT.EXE) changed for Windows 9x. Since DOS 6 is a 16-bit OS and Win 9x is 32-bit, you might want to...
Forum: Legacy and Other Languages Oct 25th, 2007
Replies: 13
Views: 5,832
Posted By Duoas
Hmm, I hadn't considered different versions. I'm using QBasic version 1.1, and everything is just piled in one folder on my G: drive. I run it from the default windows command prompt.

What version...
Forum: Legacy and Other Languages Oct 24th, 2007
Replies: 13
Views: 5,832
Posted By Duoas
I'm running XP and QBasic and help work fine for me. I can't reproduce your problem. Sorry I can't help you further...
Forum: Legacy and Other Languages Oct 24th, 2007
Replies: 13
Views: 5,832
Posted By Duoas
The file QBASIC.HLP is not a Windows Help file, so WinHelp cannot open it.
You need a program named HELP.COM. If you google olddos.exe you should find the Microsoft package that contains QBasic and...
Showing results 1 to 17 of 17

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC