Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "David Holden" Newsgroups: comp.sys.acorn.programmer Subject: Re: BBC BASIC, Long Strings, And BeagleBoard Date: Mon, 4 Jun 2012 13:37:26 GMT Organization: APDL Lines: 30 Message-ID: References: <4ca81a1d-7657-4dbb-9868-2c29a25e7f2c@f30g2000vbz.googlegroups.com> Reply-To: SpamBin@apdl.co.uk X-Trace: individual.net HAkjLbSPeTxTlIXvmWa4aw1QIa6Fjkex3PCS6E8BzDtKwmthbDgdOYGV6KAkU8gDGV Cancel-Lock: sha1:/ssoh3Vm/Q3CLNQYgCEu4BaZbCo= X-Newsreader: News Rover 12.3.0 (http://www.NewsRover.com) Xref: csiph.com comp.sys.acorn.programmer:1773 On 4-Jun-2012, Michael wrote: > I have finally decided to re-write my code to pick up music tracks, > with the ability to pick up meta data, or if lacking, decipher the > meta data from the filepath (for WAV). > > This of course means I will need to handle long filenames, and thus > long strings. > Two points. Firstly it's very bad practice to allow anything on your computer to have a path/file name longer than about 240 character as the Wimp message system can't handle anything longer than this so all sorts of programs will crash. Secondly it's best not to use Basic strings for this sort of thing anyway. A 'string' is just a collection of bytes, and you can put them in an integer array and access them with the indirection operators rather then the Basic string functions. That way they can be as long as you like. > How do I now save, and reload these from a basic data file? †I am > currently use PRINT# and INPUT#. Yuk! Those should have been shot long ago. Either arrange your data in a block of memory and load and save that (much quicker), or if you must save and load it a bit at a time use BPUT# and GET$# or BGET#. They don't do everything backwards. -- David Holden - APDL -