9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] starting to write native code
Date: Tue, 16 Mar 2004 15:01:48 +0000	[thread overview]
Message-ID: <8a70d553bbc3a31cda5b3814f5ab3eef@vitanuova.com> (raw)
In-Reply-To: <33a9260c412cec3942d2de862f44acd7@plan9.bell-labs.com>

[-- Attachment #1: Type: text/plain, Size: 68 bytes --]

and even if the line lengths weren't fixed, there's always Brdstr.

[-- Attachment #2: Type: message/rfc822, Size: 4515 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 65 bytes --]

Given that sizes are fixed, I'ld use Brdline, tokenize, and atof.

[-- Attachment #2.1.2: Type: message/rfc822, Size: 2461 bytes --]

From: <cej@gli.cas.cz>
To: <9fans@cse.psu.edu>
Subject: [9fans] starting to write native code
Date: Tue, 16 Mar 2004 14:23:59 +0100
Message-ID: <ACCF003CBA3D09458207DB0CB86AD17D066316@XMAIL.asuch.cas.cz>

hi, all!

I'm trying to read-in a matrix of floats, rows separated by
newline, columns by blanks:

0.000026 0.000019 0.000003 ... 0.000051
0.000022 0.000059 0.000003 ... 0.000033
0.000024 0.000011 0.000053 ... 0.000021
...

my idea is to use s_read_line() and s_parse(),
or am I [completely] wrong? Or is Brdline() and strtok() the way?
I usually look how others write code, however, i haven't
grepped much of those from /sys/src/cmd...
so, if somebody could just push me the right direction.
thanks, regards,

++pac.

      reply	other threads:[~2004-03-16 15:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-16 13:23 cej
2004-03-16 13:28 ` David Presotto
2004-03-16 15:01   ` rog [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a70d553bbc3a31cda5b3814f5ab3eef@vitanuova.com \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).