Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Mumps > Re: Peculiariti...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 902 of 992
Post > Topic >>

Re: Peculiarities of ascii file processing with GT.M

by rodd@[EMAIL PROTECTED] (Rod Dorman) Oct 23, 2007 at 06:11 PM

In article <1193048961.607815.275480@[EMAIL PROTECTED]
>,
Sébastien de Mapias  <sglrigaud@[EMAIL PROTECTED]
> wrote:
>Taking the code from the user's guide I wrote the
>following:
>   ... snip ...
>I have a few questions:
>1/ is there a way to tell the 'mumps' program not to
>  remove the carriage returns from the text lines ?

Most (all?) implementations allow you to open the file in a raw just
gimme all the bytes mode. Most of the time you don't want that, you
just want to read a 'line' and let the underlying implementation deal
with how the line is 'ended'.

Don't forget, in addition to the Mac carriage return line endings you
apparently are dealing with it could might be a Unix line feed line
ending. In fact, I remember hearing about some other obscure system
that couldn't make up its mind and uses both carriage return and line
feed.

>  how come I have to add a '!' to the 'write' function ?

You don't have to. Its only needed then you want to cause a new line
operation.

>2/ 'r[ead] line' processes an entire line - is it possible
>  to deal with characters one at a time only when
>  reading from a file ?

Yes, lookup what "READ *X" and "READ X#1" will do in your MUMPS
manual.

-- 
					-- Rod --
rodd(at)polylogics(dot)com
 




 4 Posts in Topic:
Peculiarities of ascii file processing with GT.M
=?iso-8859-1?q?S=E9bastie  2007-10-22 03:29:21 
Re: Peculiarities of ascii file processing with GT.M
=?iso-8859-1?q?S=E9bastie  2007-10-22 04:11:50 
Re: Peculiarities of ascii file processing with GT.M
=?iso-8859-1?q?S=E9bastie  2007-10-23 06:55:58 
Re: Peculiarities of ascii file processing with GT.M
rodd@[EMAIL PROTECTED] (  2007-10-23 18:11:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:18:01 CDT 2008.