<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 05 Apr 2005 23:36:10 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: Re: Quick to BBC

"Tom Drage" <drage@...> wrote:
> This is a program someone wrote for QuickBasic.
> 
> DEFDBL A-Z
> Pi = 2  'Starting factor
> FOR i = 2 TO 5000000 STEP 2
>     Pi = Pi * i * i / ((i - 1) * (i + 1))
> NEXT
> PRINT "Pi is approximately:"; Pi
> END
> 
> Would it be possible to convert that to BBC?
 
Exact same thing should do it:
Change DEFDBL A-Z to AUTO, then:
>*Exec M04052212
>:: Area: #0 (BBC-Micro)
Mistake
>Message:  1810 (Read 1 time, has 0 replies, 2541 bytes)
Mistake
>Date   : Tue Apr  5 22:12:42 2005 +0800
Mistake
>From   : "Tom Drage" <drage@...>
Mistake
>Subject: Quick to BBC
Mistake
>Reply-To: bbc-micro@...
Mistake
>Message-ID: <000601c539e9$88157d00$0301010a@...>
Mistake
>This is a program someone wrote for QuickBasic.
Mistake
>AUTO
   10Pi = 2  'Starting factor
   20FOR i = 2 TO 5000000 STEP 2
   30    Pi = Pi * i * i / ((i - 1) * (i + 1))
   40NEXT
   50PRINT "Pi is approximately:"; Pi
   60END
   70
   80Would it be possible to convert that to BBC?
   90
  100Thanks, Tom.
  110
  120--
  130No virus found in this outgoing message.
  140Checked by AVG Anti-Virus.
  150Version: 7.0.308 / Virus Database: 266.9.2 - Release Date: 4/5/2005
  160
Escape
>RUN
Syntax error at line 10
>L.10
   10Pi = 2  'Starting factor
>  10Pi = 2  :REM Starting factor 
>RUN
Pi is approximately:3.1415926
 
 :)
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
Prospective Parliamentary Candidate for Sheffield Brightside
BBC BASIC for the Sinclair Spectrum - http://mdfs.net/Software/Spectrum
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>