Skip to content

Attempting to set a variable to DrawScreen() results in mysterious error messages #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
expositionrabbit opened this issue Mar 28, 2015 · 1 comment
Labels

Comments

@expositionrabbit
Copy link

In this piece of code

Dim x = DrawScreen()
Print(x)
x = 5

the first line displays no error messages (it should, as DrawScreen doesn't return a value). The following line displays

Funktiota 'Print' ei ole määritelty

which is quite confusing for innoncent children. The third line displays

Ei voi tehdä tyyppimuunnosta tyypistä 'Number' tyyppiin 'undefined'

which also confuses innoncent children. The console displays vaguely sensible error messages, but innoncent children do not know how to open it.

@fergusq
Copy link

fergusq commented Mar 28, 2015

These errors raise from the fact that there is no "Void" type or whatever it is called in basic languages. The return type of DrawScreen & Co. is undefined, so x has also an undefined type.

The error messages are the worst part of the current version of the IDE. It would much more helpful for small, innocent people to introduce verbose and elaborate texts that support the learning of the young programmer.

An examples of such profound messages would be the followings:

Muuttujaa x ei voida luoda, sillä DrawScreen ei ole funktio vaan aliohjelma. Aliohjelmat eivät palauta arvoa jota laittaa muuttujaan. Oletko varma, että kutsut oikeaa funktiota?

and

Funktiota Print ei toimi annetuilla arvoilla. Se tarvitsee yhden arvon, eikä sille saa antaa enempää arvoja. Oletko varma, ettet halua käyttää &-operaattoria yhdistääksesi annetut arvot ennen, kuin kutsut Print-funktiota?

@henkkuli henkkuli added the bug label Mar 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants