none
What happen to Print command? RRS feed

  • Question

  • I was trying to teach my 10 year some computer programming since he was very curious about my work. I downloaded small basic and was trying to explain and got stumped on print command. I do not like the long textwindow.writeline, so for his teaching purpose created a sub with the name of print to make it easy. He was able to follow along my simple example with that change. Just curious why Print command was not implemented instead of this long name stuff?

    Thanks,

    Saturday, February 19, 2011 4:58 AM

Answers

  • My guess is that because smallBasic is built on top of Object Orientated C# that you are calling a method within the class TextWindow called WriteLine and that the TextWindow class is just a wrapper for C#'s Console class. Plus in SmallBasic you can work with the GraphicsWindow or the TextWindow I guess just having print may confuse beginners as to where it will be printed to.

    I personally don't see long descriptive names for methods, variables and classes as a bad thing with auto-complete in most IDE's it doesn't take any longer to type and helps to explain what a method/variable actually does/is used for.

    Saturday, February 19, 2011 1:22 PM

All replies

  • My guess is that because smallBasic is built on top of Object Orientated C# that you are calling a method within the class TextWindow called WriteLine and that the TextWindow class is just a wrapper for C#'s Console class. Plus in SmallBasic you can work with the GraphicsWindow or the TextWindow I guess just having print may confuse beginners as to where it will be printed to.

    I personally don't see long descriptive names for methods, variables and classes as a bad thing with auto-complete in most IDE's it doesn't take any longer to type and helps to explain what a method/variable actually does/is used for.

    Saturday, February 19, 2011 1:22 PM
  • I understand you completly on the first statement since I am a programmer. But if you are trying to teach kids like 10 year olds, the language should be much more easier for them to understand. So for I think print is not conceived properly for kids of 10 year old to understand. It would be good like DisplayOnMonitor or PrintToPaper or some sort will make it more meaningful. This is just a thought.

    Monday, February 21, 2011 10:37 PM
  • i am agree with above person. language is important.
    Wednesday, February 23, 2011 10:40 AM