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


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

how to use a sysvar in Basic

From Jim Nagel <jimnewsm13c@abbeypress.co.uk>
Newsgroups comp.sys.acorn.programmer
Subject how to use a sysvar in Basic
Date 2018-09-04 16:20 +0100
Organization A noiseless patient Spider
Message-ID <d1fd503257.jim@6.abbeypress.net> (permalink)

Show all headers | View raw


I'm working on a wee Basic program and at one stage I need to compare 
mystring$ to a system variable websiteroot$dir.

This system variable is set in an external obeyfile which contains 
only one line --    set websiteroot$dir <obey$dir>
-- in other words, the sysvar contains a path to a directory.

In my Basic program, lines like this work with no problem:
     headfile$ = "<websiteroot$dir>.fefi.fofum.head"
     mytail% = OPENIN "<websiteroot$dir>.fefi.fofum.tail"

But this line produces an error "Unknown or missing variable":
     PRINT websiteroot$dir
Same error whether or not I use anglebrackets <websiteroot$dir>.

Leads me to think there's something fundamental I need to understand 
about the use of sysvars within Basic.  Web search brought up various 
articles and PRM references but nothing seemed to the point.  Can 
anyone enlighten me, please?

Must I convert the contents of <websiteroot$dir> to a conventional 
Basic string?  Is there an existing elegant way of doing so?
Otherwise, I'll see where I can go from this within Basic:
     *show websiteroot$dir { > tempfile }

(Don't know where I ever found that "{ > xyz }" business.  Found no 
mention in the new User Guide or online, probably not easy to index.  
I vaguely remembered it from some dark mental crevice and played with 
spaces etc until, surprise, it worked.  What's it called?)

-- 
Jim Nagel                                www.archivemag.co.uk
>> "From" address is genuine but will change.  Website has current one.
|| See you at the show?   www.wakefieldshow.org.uk   April 21

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


Thread

how to use a sysvar in Basic Jim Nagel <jimnewsm13c@abbeypress.co.uk> - 2018-09-04 16:20 +0100
  Re: how to use a sysvar in Basic Steve Drain <steve@kappa.me.uk> - 2018-09-04 18:00 +0100
    Re: how to use a sysvar in Basic Jim Nagel <jimnewsm13c@abbeypress.co.uk> - 2018-09-04 18:54 +0100
      Re: how to use a sysvar in Basic Julian Fry <julianfry@orpheusmail.co.uk> - 2018-09-08 21:03 +0100
    Re: how to use a sysvar in Basic Jim Nagel <jimnewsm13c@abbeypress.co.uk> - 2018-09-05 17:13 +0100
      Re: how to use a sysvar in Basic Matthew Phillips <spam2011m@yahoo.co.uk> - 2018-09-05 20:19 +0100
        Re: how to use a sysvar in Basic Steve Drain <steve@kappa.me.uk> - 2018-09-06 11:19 +0100
          Re: how to use a sysvar in Basic Matthew Phillips <spam2011m@yahoo.co.uk> - 2018-09-08 10:32 +0100
            Re: how to use a sysvar in Basic Steve Drain <steve@kappa.me.uk> - 2018-09-08 14:56 +0100
              Re: how to use a sysvar in Basic Alan Adams <alan@adamshome.org.uk> - 2018-09-08 19:39 +0100
              Re: how to use a sysvar in Basic Matthew Phillips <spam2011m@yahoo.co.uk> - 2018-09-10 07:27 +0100
                Re: /  not  (OT) Jim Nagel <jnews18c@abbeypress.co.uk> - 2018-09-10 11:37 +0100
                Re: /  not  (OT) News <chrisjohnson@spamcop.net> - 2018-09-10 14:34 +0100
    Re: how to use a sysvar in Basic Alan Adams <alan@adamshome.org.uk> - 2018-09-08 11:20 +0100
      Re: how to use a sysvar in Basic Steve Drain <steve@kappa.me.uk> - 2018-09-08 14:40 +0100
  Re: how to use a sysvar in Basic "John Williams (News)" <UCEbin@tiscali.co.uk> - 2018-09-04 18:16 +0100
    Re: how to use a sysvar in Basic Alan Adams <alan@adamshome.org.uk> - 2018-09-04 22:04 +0100
      Re: how to use a sysvar in Basic Matthew Phillips <spam2011m@yahoo.co.uk> - 2018-09-05 08:03 +0100
        Re: how to use a sysvar in Basic Martin Wuerthner <spamtrap@mw-software.com> - 2018-09-05 14:39 +0200
          Re: how to use a sysvar in Basic Matthew Phillips <spam2011m@yahoo.co.uk> - 2018-09-05 19:45 +0100
            Re: how to use a sysvar in Basic Steve Drain <steve@kappa.me.uk> - 2018-09-06 11:24 +0100
    Re: how to use a sysvar in Basic "John Williams (News)" <UCEbin@tiscali.co.uk> - 2018-09-05 20:56 +0100
      Re: how to use a sysvar in Basic svrsig <chris@svrsig.org> - 2018-09-05 20:13 -0700
        Re: how to use a sysvar in Basic Matthew Phillips <spam2011m@yahoo.co.uk> - 2018-09-06 07:21 +0100
  Re: how to use a sysvar in Basic A. N. Other <ANOther@argonet.co.uk> - 2018-09-04 18:11 +0100
    Re: how to use a sysvar in Basic Jim Nagel <jimnewsm13c@abbeypress.co.uk> - 2018-09-04 18:42 +0100
      Re: how to use a sysvar in Basic Matthew Phillips <spam2011m@yahoo.co.uk> - 2018-09-05 08:08 +0100
  Re: how to use a sysvar in Basic jgh@mdfs.net - 2018-09-06 17:12 -0700

csiph-web