Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #1969

Re: Over 256 Character BASIC string

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date Thu, 02 Aug 2012 12:46:09 -0500
Date Thu, 02 Aug 2012 18:35:15 +0100
From Gavin Wraith <gavin@wra1th.plus.com>
Newsgroups comp.sys.acorn.programmer
Subject Re: Over 256 Character BASIC string
Message-ID <77320ab952.wra1th@wra1th.plus.com> (permalink)
References <d5c1f8b752.Kevin@talktalk.net> <52b806d0dcchrisjohnson+news@spamcop.net> <f72f8ab852.Kevin@talktalk.net>
Organization Home
User-Agent Messenger-Pro/1.00c (MsgServe/1.00a) (RISC-OS/5.18) NewsHound/v1.50-32
MIME-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding 8bit
Lines 29
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-PCDHsttgJl7a7qH1T8cNFZC7h0uZcl7nbF/ug/YDN+hrWnaUwNrPb9k/l5CxDKyAVC3cYtoM959srS8!X1iTztVUzlakFCo1oHvJ8PvfuDbrOie1954nlsJB55/t6jjNGonpm5ZMdczbrFIMd3TMJfxB5YLw!4hVp
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 2366
Xref csiph.com comp.sys.acorn.programmer:1969

Show key headers only | View raw


In message <f72f8ab852.Kevin@talktalk.net>
          Kevin Wells <kev@kevsoft.co.uk> wrote:

> >> What is the best way in BASIC for strings over 256 characters?

> Yes please, the trouble is I don't know how long the line will be, as
> what the application does is download the latest Euro Millions results
> that are a csv file, and display the latest 11 draws one line at a time.
> 
> Every so often the Euro Millions have a super duper millionaire draws
> where they draw many £1 Million winners and last Friday's they had 100
> which gives that line 1033 characters long.

If you use RiscLua instead of Basic you can stop worrying about 
line lengths. Presuming you have downloaded the csv data to a file
and that you have set a variable x to hold the file's pathname
on your disc then

  for line in io.lines (x) do f (line) end

lets you apply a procedure f to each line of the file in turn,
where "line" means a string of characters terminated by a newline,
i.e. one record in a csv file. Breaking the line up into fields
separated by commas (that do not appear inside quoted strings, 
of course) is easy, too, if you use the lpeg library. 
      
-- 
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Over 256 Character BASIC string Kevin Wells <kev@kevsoft.co.uk> - 2012-07-31 16:48 +0100
  Re: Over 256 Character BASIC string Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-07-31 19:22 +0100
    Re: Over 256 Character BASIC string "David Holden" <SpamBin@apdl.co.uk> - 2012-08-01 07:27 +0000
      Re: Over 256 Character BASIC string Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-08-01 10:52 +0100
    Re: Over 256 Character BASIC string Kevin Wells <kev@kevsoft.co.uk> - 2012-08-01 19:17 +0100
      Re: Over 256 Character BASIC string jgh@arcade.demon.co.uk - 2012-08-01 20:41 -0700
      Re: Over 256 Character BASIC string Chris Johnson <chrisjohnson+news@spamcop.net> - 2012-08-02 10:39 +0100
        Re: Over 256 Character BASIC string Kevin Wells <kev@kevsoft.co.uk> - 2012-08-04 18:56 +0100
          Re: Over 256 Character BASIC string Steve Drain <steve@kappa.me.uk> - 2012-08-04 19:56 +0100
            Re: Over 256 Character BASIC string Kevin Wells <kev@kevsoft.co.uk> - 2012-08-08 15:04 +0100
              Re: Over 256 Character BASIC string jgh@arcade.demon.co.uk (Jonathan Graham Harston) - 2012-08-08 23:15 +0100
                Re: Over 256 Character BASIC string Kevin Wells <kev@kevsoft.co.uk> - 2012-08-09 15:14 +0100
      Re: Over 256 Character BASIC string Gavin Wraith <gavin@wra1th.plus.com> - 2012-08-02 18:35 +0100
        Re: Over 256 Character BASIC string Kevin Wells <kev@kevsoft.co.uk> - 2012-08-04 18:58 +0100
      Re: Over 256 Character BASIC string Steve Drain <steve@kappa.me.uk> - 2012-08-03 10:37 +0100
      Re: Over 256 Character BASIC string "Ste (news)" <steve@revi11.plus.com> - 2012-08-10 14:15 +0100
        Re: Over 256 Character BASIC string "Ste (news)" <steve@revi11.plus.com> - 2012-08-10 14:23 +0100
          Re: Over 256 Character BASIC string Kevin Wells <kev@kevsoft.co.uk> - 2012-08-13 19:19 +0100
  Re: Over 256 Character BASIC string druck <news@druck.org.uk> - 2012-07-31 22:20 +0100
  Re: Over 256 Character BASIC string Duncan Moore <duncan.moore@gmx.com> - 2012-08-03 02:11 -0700

csiph-web