basicprogramming.org


Welcome, Guest. Please login or register.
Did you miss your activation email?
Forum time; Jul 31. 2010, 05:11
Home Help Search Calendar Login Register
News: Have you got suggestions for BasicProgramming.org? Let's hear them!
Interested in creating your own programming language? Check out the QDepartment group!

+  BASIC programming forum
|-+  Basic Coding
| |-+  Basic Interpreters.
| | |-+  Some questions about Small Basic (not MS)
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Reply Print
Author Topic: Some questions about Small Basic (not MS)  (Read 172 times)
LanceGary
Hero Member
*****
Offline Offline

Posts: 673


« on: Sep 22. 2009, 08:20 » Reply with quote

I've posted this on the Small Basic forum, but someone here might know the answers.

I'm using FLTK SmallBasic 0.10.5 on Windows Vista (Home Premium edition).

The following small program

a=[2,3;-1,4]
b=inverse(a)
? b

? 4.0/11

yields the following output:

[0.3.63636e+008,-0.2.72727e+008;0.09.09091e+007,0.1.81818e+008]

0.3.63636e+008

There seems to be an extra decimal point entered into these numbers. Is this a bug or something I don't understand?

The some queries.

1. Is it possible to select and copy from the output window? I have been struggling to do this.

2. Where is the log file to which logprint prints? How is this file accessed?

3. Is it possible to set default locations for files to be saved and loaded that will be loaded each session? If so, how is that done?

Lance
Report to moderator   Logged
LanceGary
Hero Member
*****
Offline Offline

Posts: 673


« Reply #1 on: Sep 23. 2009, 13:08 » Reply with quote

There seems to be a problem with the display of some division results in the latest release of SB as the following program shows. Notice that the results are accurate but that some results (not all) include a second decimal:

logprint "1/100 = ";1/100
logprint  "1/90 = ";1/90
logprint  "1/81 = ";1/81
logprint  "1/73 = ";1/73
logprint  "1/50 = ";1/50
logprint  "1/32 = ";1/32
logprint  "3/32 = ";3/32
logprint  "7/30 = ";7/30
logprint  "8/32 = ";8/32
logprint  "1/21 = ";1/21
logprint  "1/11 = ";1/11
logprint  "1/10 = ";1/10
logprint  "1/9 = ";1/9
logprint  "1/8 = "; 1/8
logprint  "1/7 = "; 1/7
logprint  "1/6 = ";1/6
logprint  "1/5 = ";1/5
logprint  "1/4 = ";1/4
logprint  "1/3 = ";1/3
logprint  "1/2 = ";1/2
logprint  "1/1 = ";1/1
logprint  "0.5/1 = "; 0.5/1
logprint  "0.3/1 = "; 0.3/1
logprint  "0.4/1 = "; 0.4/1

-------------

Output

1/100 = 0.01
1/90 = 0.01.11111e+007
1/81 = 0.01.23457e+007
1/73 = 0.01.36986e+006
1/50 = 0.02
1/32 = 0.03125
3/32 = 0.09375
7/30 = 0.2.33333e+008
8/32 = 0.25
1/21 = 0.04.76190e+007
1/11 = 0.09.09091e+007
1/10 = 0.1
1/9 = 0.1.11111e+008
1/8 = 0.125
1/7 = 0.1.42857e+008
1/6 = 0.1.66667e+008
1/5 = 0.2
1/4 = 0.25
1/3 = 0.3.33333e+008
1/2 = 0.5
1/1 = 1
0.5/1 = 0.5
0.3/1 = 0.3
0.4/1 = 0.4
Report to moderator   Logged
aurelB
Hero Member
*****
Offline Offline

Posts: 663



WWW
« Reply #2 on: Sep 23. 2009, 17:25 » Reply with quote

Small Basic has own bugs in some parts.
I really dont understand this language at all... Huh
Report to moderator   Logged

Pages: [1] Go Up Reply Print 
« previous next »
Jump to:  
Atom RDF RSS 0.91 RSS 2.0


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!