MBASIC: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 55:
 
L'MBASIC consentiva l'uso della parola chiave <code>LET</code> per la dichiarazione delle variabili, anche se il suo uso non era obbligatorio. A differenza dei primi dialetti BASIC, l'MBASIC non limitava l'uso dei nomi delle variabili a 2 soli caratteri ma permetteva di usarne fino a 40 (MBASIC 5), consentendo così ai programmatori di usare nomi più indicativi del valore che conservavano.
<!--
 
===Strutture di controllo===
=== Program flow control ===
ProgramNell'MBASIC flowil controlflusso indel MBASICprogramma wasera controlledgestito bytramite le [[Struttura_di_controllo#Strutture_di_controllo_della_programmazione_strutturata|strutture di controllo]] <code> IF...THEN...ELSE... </code> conditional tests,e <code> WHILE...WEND </code> loops,e andle istruzioni di salto <code> [[GOTO ]]</code> ande <code> GOSUB </code>. instructions.All'assenza Nodell'istruzione <code> CASE </code>, statementper wasla availablescelta fra più di 2 opzioni, althoughsi ansopperiva con l'istruzione di salto multiplo <code> ON...GOTO... </code>(computed. GOTO)Le provided multisub-wayroutine branches.non Subroutinesaveva hadparametri noe parameterstutte andle allvariabili variableserano were globalglobali. L'MBASIC didnon metteva a disposizione strumenti notper makela [[structuredprogrammazione programmingstrutturata]] mandatoryed forera programmersfacile and it was easy to writescrivere "[[spaghetti code]]".
 
<!--
== PEEKs, POKEs, and user functions ==
No discussion of BASICs on the 8-bit computers of the late '70s and early '80s would be complete without mentioning the importance of the [[PEEK and POKE]] functions for directly reading and writing to memory. Since these systems typically had no [[memory protection]], this allowed a programmer to access portions of the operating system, or functions that would not otherwise be available. This also provided opportunities for user programs to hang the system. For example, a CP/M programmer might use a <code> POKE </code> function to allow BASIC to switch the console device to the serial port, if the system [[BIOS]] supported this. For machines with real-time clocks, a set of <code>PEEK</code> instructions might have been used to access the time.