That "reference to undefined identifier: _M" error happens for me all the time. If I copy from a CRLF source into a console window on Windows XP, and then I complete the entry by just pressing enter, then all the versions of MzScheme/Racket I've used get confused about what counts as a newline. They apparently treat carriage returns as a capital M (in MzScheme) or a capital R (in Racket v5.1.1).
Scary that the letter corresponds with the name of the application. ^^; Actually, by the time the Racket rename happened, I was already in the habit of working around this by including newlines at the end of what I was pasting, so I never noticed Racket treated it as an R until just now....
Nice. Since we're on different versions of Windows, I can totally believe that. But you only got it for one definition of factorial and not the other? Did you type them in differently somehow? (Say, by putting a newline at the beginning of the second one, or by entering the first one as the very first command of the REPL session?)
Actually, there's a chance I may be able to even though I'm on XP, since it may have more to do with the version of MzScheme being used. I'll see what I can do.
I think that was my original theory. I probably even saw the R at some point, thought it came about because of the \r escape sequence, and forgot it wasn't like that all along.
Keep in mind that the underscore is added by the Arc compiler though. The M or R is being successfully compiled as a global variable reference. ^_^
Use (quit) to quit, (tl) to return here after an interrupt.
arc>
'(
Pocket-N/A)
(Rocket-N/A)
arc>
This is a bit off-topic, but despite your best efforts, you are probably not using the latest version of Arc. Sounds like you've been following the instructions at http://www.arclanguage.org/install for the whole time you've been posting here, and those are out of date by almost two years, even linking to a version of Arc 3 (one of a few Arc 3s, I think :-p ) instead of Arc 3.1. I think this is a better starting resource: http://sites.google.com/site/arclanguagewiki/.
Old versions of Arc needed to run on MzScheme 372 because it was the last MzScheme with mutable lists, but now Arc 3.1 uses some pointer manipulation to mutate lists behind Racket's back, meaning any version of Racket is fine. However, this actually introduced a rare garbage collection bug, if you can believe it. ;) That means there is actually a legitimate reason to keep using MzScheme 372, but as described at http://sites.google.com/site/arclanguagewiki/arc-3_1/known-b..., pretty much every Arc setup besides the official one avoids this bug, and it's possible to patch the official one too.
Anyway, you're the first person I've heard of who's tried Arc on Windows 7 (which isn't to say there aren't Arc Forum lurkers in the same position ^_^ ). If you encounter Arc-on-Windows-7 stumbling blocks, please continue talking about them like you have in this thread!
The -m option means to call the "main" function now. Just leave it out. It used to mean "--mute-banner", which suppressed the "Welcome to MzScheme" line.
That "racket -f as.scm" command is the right one. The 'setuid issue is one of a few known issues on Windows, and it has a known fix: http://arclanguage.org/item?id=10625.