Author Topic: Notes on Script BASIC  (Read 18767 times)

B+

  • Hero Member
  • *****
  • Posts: 823
    • View Profile
Notes on Script BASIC
« on: 20. September 2018, 20:02:20 »
Tried it once, because you know who goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on .... in everyone else thread except his own.

I got yelled at for not reading manual when I asked a question.

Sorry no manual was ever made available.

Who thinks I should try it again?


B+

  • Hero Member
  • *****
  • Posts: 823
    • View Profile
Re: Notes on Script BASIC
« Reply #1 on: 20. September 2018, 20:15:48 »
From comments I read from other Beginners with Script BASIC, I get the impression it is NOT Beginner friendly.

I know one promoter of Script BASIC who is not friendly to Beginners but that is another story...

Maybe it should be called Script ASIC ;D

B+

  • Hero Member
  • *****
  • Posts: 823
    • View Profile
Re: Notes on Script BASIC
« Reply #2 on: 20. September 2018, 20:50:53 »
Well look here,
 http://info.bannerengineering.com/cs/groups/public/documents/literature/191745.pdf
instead of yelling at people for not reading a manual, someone actually goes ahead and writes one!

Now that is watching out for Beginners.

ScriptBasic

  • Guest
Re: Notes on Script BASIC
« Reply #3 on: 20. September 2018, 20:57:21 »
Script BASIC is probably one of the best documented non-commercial open source projects out there. Not only is there a Users Guide, the developer embedded and extension API documentation let's you morph the scripting engine into whatever you need.

If there were more project managers like me, there wouldn't be over 100 abandoned BASIC languages with efforts like yours adding new plots to the BASIC graveyard.

@B+ - You are beginning to turn into a bitter whiner and losing my respect with each new post.
« Last Edit: 20. September 2018, 21:05:50 by John »

B+

  • Hero Member
  • *****
  • Posts: 823
    • View Profile
Re: Notes on Script BASIC
« Reply #4 on: 20. September 2018, 21:14:53 »
Quote
B+,

Tomaaz said he didn't like Script BASIC because there was no install program for Linux and was confused how to include the SB executable path or create the configuration file. I  would have been happy to help him get going if he would have asked.

What don't you like about Script BASIC?
Last Edit: Today at 08:07:55 by John

Asked and answered.

ScriptBasic

  • Guest
Re: Notes on Script BASIC
« Reply #5 on: 20. September 2018, 21:50:09 »
Here is another (commercial) resource for Script BASIC to feed your bitter sweet spot.

Control Solutions MN. They have been using Script BASIC embedded in their BACNet controllers since 2003.

Tomaaz

  • Guest
Re: Notes on Script BASIC
« Reply #6 on: 21. September 2018, 00:43:03 »
So, I'm an idiot who would love to use ScriptBasic, but is to stupid to start with it. Good to know.  ;D ;D ;D

John, belive me - if I really wanted to use ScriptBasic, I would manage to install and configure it. I just can't see anything what could justify using my free time do do it. For me, a serious scipting language* should out of the box come with features like proper associative arrays, sorting, filtering, applying functions to each element of an array and getting unique elements without writing FOR/NEXT loop for it. I want to have function for reading an entire text file into a string, ability to use regular expressions, recurively walking  through directories, having easy acces to a file info (basename, extension, realpath, type of the file, permissions etc.). Generic FOR loop makes things a lot cleaner and easier. Basic Internet functionality (like downloading a file) should be there. Also, support for unicode and large numbers. If I want to use Perl or JavaScript, I'm gonna use Perl or JavaScript and not ScriptBasic with Perl and JavaScript modules. Just have a look at Perl's, Python's or Ruby's standard library. Then have a look and PyPI, CPAN and Ruby Gems. Then look at ScriptBasic. Can't you see a difference?  I don't know - maybe ScriptBasic is not a bad choice for embedding, but I'm not planning to build a device that will need an embedded language to be used with it, so I don't care.

Script BASIC is probably one of the best documented non-commercial open source projects out there.

 ;D ;D ;D Comparing to what? Those 100 abandoned BASIC languages? Seriously, do you want me to die from laughing?  ;D ;D ;D

OK. Have a look at documentation pages on:

https://nim-lang.org/
https://crystal-lang.org
https://dlang.org
https://www.ruby-lang.org/en/

* Of course, languages created for fun or for specific tasks are a completely different story.
« Last Edit: 21. September 2018, 01:10:56 by Tomaaz »

B+

  • Hero Member
  • *****
  • Posts: 823
    • View Profile
Re: Notes on Script BASIC
« Reply #7 on: 21. September 2018, 01:47:57 »
You know this package looks like a decent User Manual, why not include it with SourceForge download of Script Basic?
But what is i.CanDoIt Device to practice using ScriptBasic on?

Oh it is a server $1500 to $2000 "remote monitoring solution". Just what every beginner needs.
« Last Edit: 21. September 2018, 02:08:05 by B+ »

B+

  • Hero Member
  • *****
  • Posts: 823
    • View Profile
Re: Notes on Script BASIC
« Reply #8 on: 21. September 2018, 04:00:29 »
Oh I see the big ugly secret, not a screen function to be found!

No Locate, no Input, no Cls, its all a text scroller.

Finally, I get Hello World! to work:
Code: [Select]
Print "Hello World!"
sleep 100
drag and drop onto sb64.exe

So again I say, Script ASIC is a bad BASIC for Beginners, get back to your side of the pool.

https://www.youtube.com/watch?v=oEzXvP7RMaw
« Last Edit: 21. September 2018, 04:26:56 by B+ »

Tomaaz

  • Guest
Re: Notes on Script BASIC
« Reply #9 on: 21. September 2018, 10:27:18 »
Here is a list sequence bunch* of numbers - [120, 135, 345, 345, 1890, 12, 120, 12, 135, 712, 78, 120]. The task is to print three biggest unique elements sorted from biggest to smalllest.

Python:
Code: [Select]
x = [120, 135, 345, 345, 1890, 12, 120, 12, 135, 712, 78, 120]
print(sorted(list(set(x)), reverse=True)[0:3])

Can I see ScriptBasic solution, with its "powerfull" and "flexible" arrays?

EDIT Yes, Python lists can be nested and can hold values of different types (just in case you ask this question again).

* To make Aurel happy, I've changed it once more. ;)
« Last Edit: 21. September 2018, 19:00:02 by Tomaaz »

jj2007

  • Full Member
  • ***
  • Posts: 164
  • MasmBasic rocks
    • View Profile
    • MasmBasic - faster than C
Re: Notes on Script BASIC
« Reply #10 on: 21. September 2018, 14:19:11 »
Nice that Python can handle that, but this ultra-short syntax is not necessarily good for readability. I am more comfortable with more explicit syntax:
Code: [Select]
  Dim x(11) As DWORD
  ArraySet x()=120, 135, 345, 345, 1890, 12, 120, 12, 135, 712, 78, 120
  ArraySort x(-) ; sort descending
  For_ ct=0 To x(?)-1
Print Str$(x(ct)), " "
  Next

Tomaaz

  • Guest
Re: Notes on Script BASIC
« Reply #11 on: 21. September 2018, 15:03:47 »
And where is the part that removes all duplicates from the array and leaves only unique elements?

Aurel

  • Regular Member
  • Hero Member
  • *
  • Posts: 587
    • View Profile
Re: Notes on Script BASIC
« Reply #12 on: 21. September 2018, 15:20:30 »
What you see as list is not a list than array of pointers because python don't have native built in
linked  list  :o
you probably need to use lib written in C/C++ to do that in python
I once tried ScriptBasic and never again and i have some exeperience in Basic but
this thing is not for me and i doubt that is for any begginer at all 
**********************************
http://basicpro.mipropia.com/smf/index.php

Aurel

  • Regular Member
  • Hero Member
  • *
  • Posts: 587
    • View Profile
Re: Notes on Script BASIC
« Reply #13 on: 21. September 2018, 15:23:51 »
WOW ...WOW ...
John is really quick he delete account here
geee
**********************************
http://basicpro.mipropia.com/smf/index.php

Tomaaz

  • Guest
Re: Notes on Script BASIC
« Reply #14 on: 21. September 2018, 16:09:46 »
Aurel, I've changed "list" to "sequence". Happy?  ;D You can also call it "a group", or "a bunch". I don't care, because it's clear what the task is and internal representation and handling of data in different languages has nothing to do with it.