Bernard, I do agree that it might be more fully documented, though
once you've figured it out it's not exactly a burden.
"write to file" does the same thing as URL "file:", so you can do
"open file somefile for binary write", just as you can do URL "binfile:"
Best,
Mark
On 24 Apr 2007, at 10:55, Bernard Devlin wrote:
Hi Mark, thanks for the speedy response. I guessed that something
like that was going on. However, it certainly should be documented
more clearly. The documentation for the "file" keyword does not
mention this at all.
Furthermore, what I find strange is that putting any of these
characters as a line-ending produced the strange ^M when viewed
using vi:
return
CRLF
numToChar(10)
numToChar(13)
It is really weird that one has to use binfile to write a text
file. Also, I had the same problem using "write to file". So, it
looks like it is more widespread than just using the "file:" url
schema.
But thank you for at least confirming that I'm not losing my sanity
(or at least confirming that this episode is not, in itself,
evidence of that!) Still, I won't get back those hours lost on
something as trivial as this.
Bernard
Bernard, in Rev itself, numToChar(10) is used for line endings
(showing its Unix origins), but if written to a file on a Mac, using
URL "file:", they're translated to numToChar(13). If using URL
"binfile:", no translation happens, so numToChar(10) is preserved.
I think what you're seeing is a difference between OS X and it's Unix
underpinnings - vi is a Unix utility, so expects NumToChar(10), but
the mac OS uses numToChar(13).
I guess the solution is to use the "binfile:' scheme. I have
certainly found this to be necessary when writing cgi scripts in Rev.
Best,
Mark
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution