Home  |  Contents 
Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: MMBasic for DOS Beta 6 Post ReplyPost New Topic
<< Prev Page of 8 Next >>
Author
Message << Prev Topic | Next Topic >>
darthmite
Senior Member
Senior Member
Avatar

Joined: 20 November 2011
Location: France
Online Status: Offline
Posts: 221
Posted: 29 August 2017 at 8:07pm | IP Logged Quote darthmite

CaptainBoing wrote:
flip wrote:

Chr$(0) thru Chr$(255) are all valid string character values. I just think of STRING type as a list of 8-bit bytes, [with a length byte (0-255) in front]...not necessarily used for Ascii purposes.


+1


And another +1
Is just that the character table on Maximite dont go that far.
Here the example for US Layout (on stm32 version) ... The 1st generation of PIC32 was not like the one we got now , Geoff probably try to limit the use of the flash to what really was needed at this time


     // US Layout (QWERTY)
     {
     0,     0,     0,     0,     'a',     'b',     'c',     'd',     'e',     'f',     //   0-  9
     'g',     'h',     'i',     'j',     'k',     'l',     'm',     'n',     'o',     'p',     //  10- 19
     'q',     'r',     's',     't',     'u',     'v',     'w',     'x',     'y',     'z',     //  20- 29
     '1',     '2',     '3',     '4',     '5',     '6',     '7',     '8',     '9',     '0',     //  30- 39
     ENTER,     ESC,     BKSP,     TAB,     ' ',     '-',     '=',     '[',     ']',     '\\',     //  40- 49
     0,     ';',     '\'',     0,     ',',     '.',     '/',     0,     F1,     F2,     //  50- 59
     F3,     F4,     F5,     F6,     F7,     F8,     F9,     F10,     F11,     F12,     //  60- 69
     0,     0,     0,     INSERT,     HOME,     PUP,     DEL,     END,     PDOWN,     RIGHT,     //  70- 79
     LEFT,     DOWN,     UP,     0,     0,     0,     0,     0,     0,     0,     //  80- 89
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     //  90- 99
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     // 100-109
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     // 110-119
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0     // 120-129
     },



Cheers.


__________________
Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)


Back to Top View darthmite's Profile Search for other posts by darthmite
 
Peter63
Newbie
Newbie


Joined: 28 July 2017
Location: Sweden
Online Status: Offline
Posts: 14
Posted: 01 September 2017 at 9:33pm | IP Logged Quote Peter63

2017-09-01_213051_MMBasic_DOS_5_4_Quick_Guide.zip

I wrote this, a summary of commands and fuctions.
Peter
Back to Top View Peter63's Profile Search for other posts by Peter63
 
flip
Regular Member
Regular Member


Joined: 18 July 2016
Location: Australia
Online Status: Offline
Posts: 61
Posted: 07 September 2017 at 3:44am | IP Logged Quote flip

Hi Geoff,
Just a little bug when using calculation in the first parameter of the INPUT$ command:
Open "~tmp.txt" For Output As #1
Print #1, "Hellothereeveryone"
Close #1
strt=6 : fnsh=11 : lngth=fnsh-strt

Open "~tmp.txt" For Random As #1
Seek #1, strt
Print Input$(lngth, #1)
'(prints: there)
Seek #1, strt
Print Input$(fnsh-strt, #1)
Error: Internal fault (sorry)
Regards Phil
Back to Top View flip's Profile Search for other posts by flip
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 07 September 2017 at 6:37am | IP Logged Quote Geoffg

Good one Phil, your test program was a huge help in finding it - thanks.

I will fix it in the next release.

Geoff
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 07 September 2017 at 6:42am | IP Logged Quote Geoffg

robert.rozee wrote:
there does seem to be a small problem with the files command

Thanks Rob, that one will be fixed in the next release also.

Geoff
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
flip
Regular Member
Regular Member


Joined: 18 July 2016
Location: Australia
Online Status: Offline
Posts: 61
Posted: 13 September 2017 at 10:59pm | IP Logged Quote flip

Hi Geoff, all,
Still having great fun with this.
1. Geoff wrote:
Quote:
I will look into a function that returns the current cursor position
I won't need any more in my programs, so leave it to you whether to pursue. (anyone else who needs it please leap in!!)
2. A really minor thing is that the Windows title bar doesn't restore when returning from a 'System' command.(can be seen in Builder test program attached). This is really only a 'nice-to-have'.[EDIT 15/9: There is the SETTITLE command which gives us more control anyway - I forgot about this - Geoff has the bases covered ]
3. Attached is a Builder demo as part of Character-based GUI/IDE I'm working on. It generates and runs a HELLO.BAS program then returns. Hope it inspires others with what is possible !
2017-09-13_224727_BuilderH.zip
EDIT: Thought about it driving to work and realised this (very basic Builder version)will rely on MMBASIC.EXE being the default program that Windows will run when presented with a '.BAS' file. In all other respects it will build, and you will be able to run the produced HELLO.BAS program separately.

EDIT2: Sorry I was too quick...attached version BuilderI.BAS 2017-09-14_053329_BuilderI.zip should work correctly if MMBASIC.EXE is placed in same directory as the unzipped BuilderI attached OR MMBASIC.EXE is in your Windows PATH environment variable.
Regards,
Phil

Edited by flip on 14 September 2017 at 9:47pm
Back to Top View flip's Profile Search for other posts by flip
 
flip
Regular Member
Regular Member


Joined: 18 July 2016
Location: Australia
Online Status: Offline
Posts: 61
Posted: 19 September 2017 at 4:46am | IP Logged Quote flip

Hi Geoff,
This bug is very tiny, a SUB or FUNCTION in first line is not recognised by the interpreter. Threw me for a little while when testing updates to my app builder program. Super easy to work-around seems to be just put anything, apostrophe, empty line, whatever on first line of the program.
> LIST
Sub SayHelloTo(name$)
    Print "Hello, ";name$
End Sub
SayHelloTo "Al"
> RUN
[4] SayHelloTo "Al"
Error: Unknown command
>


Regards,
Phil
Back to Top View flip's Profile Search for other posts by flip
 
Peter63
Newbie
Newbie


Joined: 28 July 2017
Location: Sweden
Online Status: Offline
Posts: 14
Posted: 19 September 2017 at 7:33am | IP Logged Quote Peter63

Hi Geoffg, all,

I missed a way to send in a default string to input -command?


s$="default string"
input"Default string to be edit or not";s$
print s$


Any trix or fix?


Back to Top View Peter63's Profile Search for other posts by Peter63
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 19 September 2017 at 9:12am | IP Logged Quote Geoffg

flip wrote:
This bug is very tiny, a SUB or FUNCTION in first line is not recognised by the interpreter.

Wow! That is a subtle one. Thanks for finding it and thanks for the demo code.

Geoff
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2135
Posted: 19 September 2017 at 9:18am | IP Logged Quote Geoffg

Peter63 wrote:
I missed a way to send in a default string to input -command?

s$="default string"
input"Default string to be edit or not";s$
print s$

Any trix or fix?

If the user just hits enter the variable will be set to an empty string or zero. So I normally do something like this:

input"Default string to be edit or not";s$
if s$ = "" then s$="default string"
print s$


Geoff
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
twofingers
Guru
Guru


Joined: 02 June 2014
Location: Germany
Online Status: Offline
Posts: 506
Posted: 19 September 2017 at 9:35am | IP Logged Quote twofingers

Hi Peter,

this is not the solution for Micromites (or MMBasic for DOS)! But for Maximites I wrote a function called "LineEdit". Maybe is it a inspiration to do it on Micromites (or MMBasic for DOS)?
2017-09-19_093400_LineEdit2.zip

Regards
Michael

Edited by twofingers on 19 September 2017 at 10:39am
Back to Top View twofingers's Profile Search for other posts by twofingers
 
Peter63
Newbie
Newbie


Joined: 28 July 2017
Location: Sweden
Online Status: Offline
Posts: 14
Posted: 20 September 2017 at 6:25am | IP Logged Quote Peter63

Hi, Geoff

Yes, this is a way, to do it .
But i missed the edit part of the string .

input"Defaultástringátoábeáeditáoránot";s$
ifás$á=á""áthenás$="defaultástring"
printás$


Is sending in default-string to buffer before input a way?

MM.keybuf$="defaultástring"
input"Defaultástringátoábeáeditáoránot";s$
printás$


Peter
Back to Top View Peter63's Profile Search for other posts by Peter63
 


<< Prev Page of 8 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1250 seconds.
Privacy Policy     Process times : 0, 0.02, 0, 0.11