What versions of MSX-BASIC does support the use of Indentation? (General discussion MSX Fora)MSX Resource Center MSXdev 2008 - MSX1 development bonanza!           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 145 gasten en 8 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

General discussion - What versions of MSX-BASIC does support the use of Indentation?

Schrijver

What versions of MSX-BASIC does support the use of Indentation?

Yukio
online
msx professional
Berichten: 764
Geplaatst: 18 Oktober 2007, 18:56   
Can the version that you use support this "feature"?
Indentation is widely spread over the computer classes around the world.

The MSX-BASIC is also interpreted instead of being a compiled language. Much of the newer and structured (commercial) versions of BASIC for Personal Computers are now compiled languages, even resembling something from Pascal and other languages.

If a BASIC list is saved in plain ASCII it could be edited into almost any universal Text Editor, only the tokenized files need to be converted for use into other machines ...


[D-Tail]

msx guru
Berichten: 2980
Geplaatst: 18 Oktober 2007, 19:12   
MSX BASIC is a non-procedural language, so indentation seems pretty useless to me. It can be done, but it'll only eat up bytes and speed.
mohai
msx lover
Berichten: 118
Geplaatst: 19 Oktober 2007, 11:48   
I think it is not that useless.
You can use it as a way to "tidy up" your BASIC listing. and will make the reading much more easy.
It only takes a couple of bytes more in memory (TAB=0x09) and i think it will not affect to speed.

Compare:

10 screen 2
20 for i=0 to 255
30 vpoke 0+i,i
40 vpoke 8192+i,i
50 next

and

10 screen 2
20 for i=0 to 255
30 _____vpoke 0+i,i
40 _____vpoke 8192+i,i
50 next

BASIC interpreter will do the same, as it will ignore extra spaces or TABS...

Hey! MSX.ORG editor DO support TABs, but the post DO NOT show them, so i had to use "undescores" (by the way).
manuel
msx guru
Berichten: 3350
Geplaatst: 19 Oktober 2007, 12:07   
Try the [ code ] tag:
10 screen 2
20 for i=0 to 255
30     vpoke 0+i,i
40     vpoke 8192+i,i
50 next


By the way, as MSX-BASIC is an interpreter, these spaces do cost time. Better use NestorPreter, a great MSX-BASIC preprocessor. You can code in great style and the preprocessor will generate an efficient run time version. http://www.konamiman.com/msx/msx-e.html#nestorpreter
NYYRIKKI
online
msx master
Berichten: 1494
Geplaatst: 19 Oktober 2007, 14:12   
Actually it takes some more space as MSX-BASIC editor converts TABs to spaces during editing. MSX-BASIC interpreter anyway works with TABs, so you just need some external BASIC editor. (I just don't think there exists any)
AuroraMSX

msx master
Berichten: 1224
Geplaatst: 19 Oktober 2007, 22:16   
Quote:

so you just need some external BASIC editor. (I just don't think there exists any)

Vi(m), Emacs, Notepad, jEdit, VisualStudio , SlickEdit, Crimson, TED, ...

Any text editor will do the trick
NYYRIKKI
online
msx master
Berichten: 1494
Geplaatst: 19 Oktober 2007, 22:37   
Ah, I didn't realize that this conversion does not happen when loading ASCII file.
Well... problem solved...
 
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.