On 20 Apr 2012, at 16:40, "Dilwyn Jones" <dil...@evans1511.fsnet.co.uk> wrote:

>>> So like all the BASICS, it is interpreted as it is run.
>> Not quite the same.  Yes- superBasic runs uncompiled but errors only show 
>> when they
>> are encountered.
>> Python  (and perl - my preference) compiles first, syntax errors show then 
>> and it stops
>> with error display - often wildly confusing if things lke closing quotes (or 
>> a dreaded ';' in
>> Perl) is missed. Only if it compiles does it run the program.
> 
>>> It will be interesting to see whether this happens, and which computer 
>>> languages actually
>>> then get used.
>> 
>> One of the really great features of python is no {} structure or semi-colons 
>> - it relies on indenting.
>> This imposes good layout, which I in fact always attempt in perl ( and C).
>> 
> This all sounds very interesting and possibly a fairly straightforward 
> language for S*BASIC users to learn. I notice there's versions of Python for 
> Windows as well as Linux etc. Anyone know if a Python program written on one 
> platform such as Windows, be run on another such as Linux? Guess if the 
> programs are written and saved using a text editor there's a chance this 
> might be possible, although probably endian issues might arise with numbers, 
> for example? Admittedly I know nothing about Python (yet... - it looks 
> interesting)
I don't really know python, but I am sure it is much like perl.

One has a first line for Linux - #!/usr/bin/perl/ - which points to the 
compiler.
Under windows one uses 'perl program name' - and it ignores the pointer, as it 
is a comment!
Any extra modules needed are loaded using 'include', again at the beginning.
There will be no issues with the code as long as these modules are there - 
usually.  However, especially in the area of gt lt etc, syntx changed. These 
languages though seem to be backward compatible in the main.
I always write witth a text editor, often on a different platform.
> 
>> I always thought it was a pity superBasic demanded line numbers. They were 
>> not actually necessary,
>> and if GOTO did not exist, not even used.
> I think QLiberator at least can compile without line numbers (never actually 
> tried that). Perhaps George could tell us if Turbo can too.
> 
> GOTO and GOSUB are one thing, you can usually do without them. What about 
> RESTORE line_number though?
> 
Ah I didn't know about that one, and have never used it.
> 
Tony

-- 
    t...@firshman.co.uk        http://firshman.co.uk  
Voice: +44 (0) 1442 828254      Fax: +44 (0) 1442 828255. Skype: tony firshman 
    TF Services, 29 Longfield Road, Tring, Herts, HP23 4DG
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to