PDA

View Full Version : Is there an ISO for the "Basic" standard?



Edcronos
22-01-2017, 13:49
Is there an ISO for the "Basic" standard?

I ask this why I downloaded some different Basic and a very simple code that works in one of them does not work in others
Example is the concatenate
Some use "&" others "+"
I keep thinking about the case of
A = 1: b = 2
C = a & b "12", c = a + b "3",
C = a + b "concatenate!?"
Function recall

Function as () as long
Function = value output
End function

Function as () as long
As = value out
End function

Function as () as long
Return Value Out
End function

Some have goto and gosub, others do not
Among other differences
Base 0, base 1, mixed


Apparently contrary to other languages, basic has no basis
This takes the force of the language that although anyone "even I" can learn easily does not go forward for lack of standardization and what is written for one type of basic does not work on the other

The right would be for programmers to love language to create a standardization page where they would be the basis for others to follow when writing their language interpreters or compilers
Something like functions, variables and basic commands, declaration syntax, among other things, to even create a default oop for the own basic where it did not let the language ease awayn the other





existe algum ISO para o padrão do "Basic" ?

pergunto isso por que baixei alguns Basic diferentes e um codigo mesmo bem simples que funciona em um deles não funciona nos outros
exemplo é o concatenar
uns utilizam o "&" outros "+"
fico pensando no caso de
a=1:b=2
c=a & b "12", c=a + b "3",
c=a + b "concatenar !?"

uns tem goto e gosub, outros não tem
entre outras tantas diferenças

pelo visto ao contrario de outras linguagens, basic não tem bases
isso tira a força da linguagem que apesar de qualquer um "até mesmo eu" conseguir aprender facilmente acaba não indo a frente por falta de padronização e o que se escreve para um tipo de basic não funciona no outro

o certo seria voces programadores amantes da linguagem criar uma pagina de padronização onde ficariam as base para outros seguirem quando forem escrever seus interpretadores ou compiladores da linguagem
algo como funções ,variaveis e comandos basicos, sintaxe de declaração , entre outras coisas, até mesmo criar um oop padrão para o proprio basic onde não deixasse fugir a facilidade da linguagem

primo
22-01-2017, 14:16
if you want Goto, Gosub functions then use the free version of powerbasic. thinbasic is made by commercial powerbasic compiler version 10.04 but designed with many additions, innovations, tricks.... etc. look here http://www.thinbasic.com/community/showthread.php?12718-PowerBasic-v9-07
goto http://forum.powerbasic.com/ and register to the forum, try LogIn with your chosen name or email, and password after a few hours or wait one or two days until you get email for confirmation, you may never get an email so LogIn immediately or after a few hours. the name should be real and not like as an example "primo"
using Michael description: Get into the store through the forum, NOT the main page. Or from the main page, when you are in the store, click on catalog.
note the serial numbers of the free products.

there is also modern quick basic here http://www.qb64.net/ which have Goto Gosub

Edcronos
22-01-2017, 14:34
My question is not over goto and gosub
Is yes in the differences in the various implementations with name BASIC

Although I find gosub and goto a facilitator, if I did not have it in basic I would certainly have learned something different
I already downloaded the power basic 9, the freebasic among others and each one has its own style
One accepts dim array (1 to 10, 0 to 20), another no longer accepts, in the other arrays created by the system as with the base are split 0 and the others created by the programmer are base 1

This kills the language, and leaves the novice programmer confused,
And if something he has abituo to use, stop having support, his codes are practically lost

jack
22-01-2017, 15:47
hello Edcronos
I don't know that there's an ISO BASIC standard freely available or an exhaustive comparison of the many BASIC dialects but if you want to run old BASIC programs then qb64 may be for you, give it a try.
what kind of programs you want to write?
maybe I could make a recommendation.

Petr Schreiber
22-01-2017, 17:17
Wikipedia (https://en.wikipedia.org/wiki/BASIC) lists a few BASIC standards:



ANSI/ISO/IEC Standard for Minimal BASIC:

ANSI X3.60-1978 "For minimal BASIC"
ISO/IEC 6373:1984 "Data Processing — Programming Languages — Minimal BASIC"


ECMA (https://en.wikipedia.org/wiki/Ecma_International)-55 Minimal BASIC (withdrawn, similar to ANSI X3.60-1978)
ANSI/ISO/IEC Standard for Full BASIC:

ANSI X3.113-1987 "Programming Languages Full BASIC"
INCITS/ISO/IEC 10279-1991 (R2005) "Information Technology – Programming Languages – Full BASIC"


ANSI/ISO/IEC Addendum Defining Modules:

ANSI X3.113 Interpretations-1992 "BASIC Technical Information Bulletin # 1 Interpretations of ANSI 03.113-1987"
ISO/IEC 10279:1991/ Amd 1:1994 "Modules and Single Character Input Enhancement"


ECMA (https://en.wikipedia.org/wiki/Ecma_International)-116 BASIC (withdrawn, similar to ANSI X3.113-1987)



If you check their age, I think this is not something we would like to base our work on.

I admit the range of variety across different BASIC dialects can be confusing. I, personally, take inclusion of BASIC in thinBASIC as a designers promise to keep things simple and accessible.


Petr

Edcronos
22-01-2017, 22:20
Not just confusing
But it totally detracts from the language
This is why even the simplest codes are not able to run between different implementations

About iso did not know it was paid, which I think is absurd
But as I said, the programming community itself can create a new language pattern

Start, create type polls to be used

Default "Base1" "Base0" (<my vote is "Base1")
Goto by default "yes" "no" (<my vote is "yes")
Gosub as standard "yes" "no" (<my vote is "yes")
Concatenate "&" "+" (<my vote is "&")
Variant as default "yes" "no" (<my vote is "yes")
Char as default "yes" "no"
Byte as default "yes" "no"
Standard Long (32bit) is 2 byte, 4 byte ...
Extension ".bas" "..." "..."
"Let", "Let $"
"Function = result", "function-name = result", "return result"
....
So the staff even not wanting to follow a restricted pattern can go for what has the most votes




não apenas confuso
mas descaracteriza totalmente a linguagem
isso por que mesmo os codigos mais simples é capaz de não executar entre diferentes implementações

sobre o iso não sabia que era pago, o que eu acho um absurdo
mas como falei, a propria comunidade programadora pode criar um novo padrão da linguagem

de inicio, criar enquetes de tipos a serem usados

Default "Base1" "Base0" (<my vote is "Base1")
Goto by default "yes", "no" (<my vote is "yes")
Gosub as standard "yes", "no" (<my vote is "yes")
Concatenate "&", "+" (<my vote is "&")
Variant as standard "yes", "no" (<my vote is "yes")
Char as default "yes", "no"
Byte by default "yes", "no"
Standard Long (32bit) is 2 byte, 4 byte ...
Extension ".bas", "...", "..."
"Let", "Let$"
"função=resultado" , "Nome-função=resultado" , "Retorno resultado"
....
assim o pessoal mesmo não querendo seguir um padrão restrito pode ir pelo que tiver mais votos