David542
David542

Reputation: 110452

What would the following display in scheme?

I have tried this expression on a few (online) scheme interpreters/parsers and sometimes get different answers. For the following expression:

(display "okkk") \; "ok;" ;"ok"

What would it display and/or return? Why? For example:

Upvotes: 0

Views: 76

Answers (1)

Rainer Joswig
Rainer Joswig

Reputation: 139401

That probably depends on what Scheme syntax your implementation may support.

One might for example expect:

(display "okkk")    -> displays okkk
\;                  -> error: unbound variable
"ok;"               -> displays nothing, but returns the string
;"ok"               -> end of line comment

Upvotes: 3

Related Questions