<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 20 Nov 2009 14:15:59 +0000
From   : rs423@... (Mick Champion)
Subject: Quine

Steve Fewell wrote:
>>> I also made these changes:
>>> 70 UNTIL A%>=TOP-1       
>>>       
>>              
>>    
>> /// okay larger or equal to rather than my plain equal to.
>>     
>
> Yes, and I took away the '?' before A%
>   
Arrgh! I really can't copy. Thanks. The sooner I get my beeb linked up 
to the PC again, the better. No chance of any copy errors then eh.


>   
>>> 140 B%=?A%*256+A%?1:A%=A%+2:PRINT ;B%; 
>>>       
>>    
>> /// see you added ";" before B%; fair enough.
>>     
>
> Yes, but not sure whether you need that for line numbers that are not after
GOTO - as the should be formatted to 5 characters with left spaces! So maybe
@%=5 is a good solution, as mentioned by someone else.
>   
Well it works with or without it, but it wasn't something I thought I'd 
missed. I put the line in without a semi-colon as it was the first thing 
to be printed at the start of the new line forgetting that a PRINT 
statement had already been issued from PROCNEWL.  As far as @% goes, I 
never really got my head around that either. I always had to get the 
book out to use it. Results varied. All I remember about it is it made 
more sense sending it a 24 bit? HEX number. No time to look it up as 
work looms. <miserable@... thought>


Mick.



> --- On Fri, 20/11/09, Mick Champion <rs423@...> wrote:
>
>   
>> From: Mick Champion <rs423@...>
>> Subject: Re: [BBC-Micro] Quine
>> To: bbc-micro@...
>> Date: Friday, 20 November, 2009, 12:34
>> Steve Fewell wrote:
>>     
>>> No you had STR$ - you missed CHR$!
>>>
>>> 455 DATA 189,"CHR$"
>>>
>>> I also made these changes:
>>> 70 UNTIL A%>=TOP-1       
>>>       
>>              
>>    
>> /// okay larger or equal to rather than my plain equal to.
>>
>>
>>     
>>> 140 B%=?A%*256+A%?1:A%=A%+2:PRINT ;B%; 
>>>       
>>    
>> /// see you added ";" before B%; fair enough.
>>
>>
>>     
>>> 270 PRINT ;?B%-B%?1;         
>>>       
>>              
>> /// typo. Missed the two ";"'s out
>>
>>
>>
>>     
>>> 320 IF A$="*" A$="<*"+STR$?A%+"*>"   
>>>       
>>      
>> /// yet another typo. Yes should hve been A$ not A%
>>
>>
>>
>> Cheers,
>>
>> Mick.
>>
>>
>>
>>
>>
>>
>>
>>     
>>> Steve.
>>>
>>> --- On Fri, 20/11/09, Mick Champion <rs423@...>
>>>       
>> wrote:
>>     
>>>    
>>>       
>>>> From: Mick Champion <rs423@...>
>>>> Subject: Re: [BBC-Micro] Quine
>>>> To: bbc-micro@...
>>>> Date: Friday, 20 November, 2009, 0:50
>>>> Mick Champion wrote:
>>>>      
>>>>         
>>>>> 400 DATA 128,"AND"
>>>>> 410 DATA 130,"EOR"
>>>>> 420 DATA 132,"OR"
>>>>>     
>>>>>        
>>>>>           
>>>> ....
>>>>
>>>> Arrrgh! I missed out the token for STR$
>>>>
>>>> 455 DATA 195,"STR$"
>>>>
>>>>
>>>> Also see a "!" on line 140. Oh dear. Failure!!!!
>>>>         
>> Better
>>     
>>>> leave looking 
>>>> more until I wake up sometime next month
>>>>         
>> <cry>
>>     
>>>> Mick.
>>>>
>>>>
>>>> _______________________________________________
>>>> bbc-micro mailing list
>>>> bbc-micro@...
>>>> http://lists.cloud9.co.uk/mailman/listinfo/bbc-micro
>>>>
>>>>      
>>>>         
>>>        
>>>    
>>>
>>>       
>> ------------------------------------------------------------------------
>>     
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com 
>>> Version: 9.0.707 / Virus Database: 270.14.73/2514 -
>>>       
>> Release Date: 11/19/09 19:42:00
>>     
>>>    
>>>       
>> _______________________________________________
>> bbc-micro mailing list
>> bbc-micro@...
>> http://lists.cloud9.co.uk/mailman/listinfo/bbc-micro
>>
>>     
>
>
>       
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 9.0.709 / Virus Database: 270.14.74/2515 - Release Date: 11/20/09
08:02:00
>
>   
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>