Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:13 07 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite MMBasic V5.2 Beta 2

     Page 2 of 2    
Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 12:36am 02 Sep 2016
Copy link to clipboard 
Print this post

@Geoff,

Can I make a little suggestion that will save a lot of potential confusion.

I agree with Phil23 regarding version numbering. A.BB.CCC where a is a major release, BB is an incremental release, and CCC are beta releases for A.BB (i.e. testing version).

This is pretty much what you do now; however, my request is can you make MM.VER the SAME number please

@panky
I understand your request about print numbering BUT this is not as easy as it sounds. Keeping up-to-date 'printed' manuals will require either a lot of printing, or a lot of version control documentation. The issue is if you see a page with a different version number on the footer to the one you have printed how do you know quickly if there any changes with the content between the two pages? The only way to be sure is to print the new page which is exactly what you are are trying to avoid (or read the whole page word for word before deciding if it needs printing - not easy with this size manual )

My solution is to simply visit Geoff's website each time I need to reference the manual, download it, and view the relevant section. I do this on a tablet; and I know what you mean about the wife not being too happy reading this in bed (my wife I mean!!)

WW
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 07:51pm 08 Sep 2016
Copy link to clipboard 
Print this post

@Geoff,

Would it be possible to add the decimal point to the permisable characters for font #6 in the Micromite + ?

panky

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 02:17am 09 Sep 2016
Copy link to clipboard 
Print this post

Yes, that is a glaring omission. I will add it to the list for investigation.

Geoff
Geoff Graham - http://geoffg.net
 
Cremo
Newbie

Joined: 21/07/2015
Location: Italy
Posts: 36
Posted: 03:29am 09 Sep 2016
Copy link to clipboard 
Print this post

Hi Geoff,

thank you for your wonderful work.
I would like to know why the DISPLAYBOX do not respond to touch.
I think that it is useful for example in this case:
you want to change parameters with an encoder selecting one of the DISPLAYBOX showing the value.
I was forced to check the coordinates during the touch interrupt.
It can be very much simple do the test of the number of the object.
Best regards.

Pietro
 
nibbler
Newbie

Joined: 18/04/2013
Location: Canada
Posts: 11
Posted: 06:41am 09 Sep 2016
Copy link to clipboard 
Print this post

@Geoff

Many thanks for all of your efforts with MMBasic and the Maximites & Micromites. I have a simple (I hope) request that might be of benefit to some of us. Would it be a lot of work to provide an errata to the manual after a major or incremental release? Sometimes someone finds a typo or error in the latest manual and posts it here in TBS but subject lines aren't always descriptive and corrections can be missed.

Thanks again. It keeps getting better and better.

Alan

 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 11:55pm 09 Sep 2016
Copy link to clipboard 
Print this post

This is something that I have thought about but is not easy to implement. Firstly, the Change Log records the changes to the firmware and these are reflected in the manuals. So this just leaves the smaller changes (typos, errors, etc) which are not logged.

I did try generating change bars (I use Word 2003) but they messed up the formatting but there must be some other way of using software to generate a change log.

Geoff
Geoff Graham - http://geoffg.net
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4036
Posted: 12:27am 10 Sep 2016
Copy link to clipboard 
Print this post

I suppose if you also release the DOC then people could ask Word to show the change bars. (I guess almost no-one wuld, though.)

A PDF to text converter applied to old & new PDFs then a text compare wouldn't be too hard, for the few who want to know every change.

John
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 04:54pm 20 Sep 2016
Copy link to clipboard 
Print this post

  lew247 said  Is there an arg$ function? or will there be in future versions?
It would make trying to use specific sections of comma separated items so much simpler if there was.

I was thinking of implementing something like:

n = GetArgs(src$, delim$, array$())

Where:
n = number of delimited values found
src$ = is the source string containing the values
delim$ = is the delimiters (one or more) that separate the values
array$() = is a pre defined string array which will hold each value

So, for example:
n = GetArgs("aa,fff,78,g", ",", a$())
n would contain 4
a$(0) would contain "aa"
a$(1) would contain "fff"
a$(2) would contain "78"
etc

Would this suit everyone's needs?
Any suggestions or extensions that should be included?

Geoff
Geoff Graham - http://geoffg.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 05:41pm 20 Sep 2016
Copy link to clipboard 
Print this post

I would put the delimiter(s) last and have it optional, defaulting to comma

n = GetArgs(src$, array$()[, delim$])

Only because it matches the other languages I use.

Would your function redim the array so we don't have to guess the required size?

The next request will be to handle quoted text.

Jim
Edited by TassyJim 2016-09-22
VK7JH
MMedit
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 06:22pm 20 Sep 2016
Copy link to clipboard 
Print this post

Thanks Jim, that syntax is better.

I'm not sure about auto rediming the array, that is not easy to do so I will have to look at it.

What exactly do you mean by "quoted text"?
Geoff Graham - http://geoffg.net
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2430
Posted: 06:35pm 20 Sep 2016
Copy link to clipboard 
Print this post

how about:

n = CountArgs(src$, delim$)


where the value returned by CountArgs tells you how many arguments are contained in src$.

and then have a second function:

A$ = GetArg$(src$, delim$, i)


where i is the index of the argument to be extracted, and the value returned is that argument.

the nice thing about this approach is that there would be no need to resize arrays within the interpreter, and none of the functions would be exhibiting unpleasant 'side effect' behaviour that is considered so uncouth.


cheers,
rob :-)Edited by robert.rozee 2016-09-22
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 06:57pm 20 Sep 2016
Copy link to clipboard 
Print this post

  Geoffg said  
What exactly do you mean by "quoted text"?

This is typically what CSV files will contain.
  Quote  27,"Fred Jones",painter,$120.00,"Perth,WA"


Any field enclosed in quotes stays as one field even if it contains the delimiter within the quotes.

They can be a pain to pass without resorting to character at a time.

I would be happy with Robert's approach also. With the delimiter as the last argument and optional, it is what I am used to.

PureBasic uses:
Result$ = StringField(String$, Index, Delimiter$)

and Liberty Basic uses:
Result$ = WORD$( stringExpression, n [,string delimiter] )

JimEdited by TassyJim 2016-09-22
VK7JH
MMedit
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2430
Posted: 07:29pm 20 Sep 2016
Copy link to clipboard 
Print this post

so then:

n = CountArgs(src$, delim$ [, quote$])
A$ = GetArg$(src$, i, delim$ [, quote$])


where quote$ contains the quote mark character(s).

delim$ could also be optional, defaulting to just a comma if not present:

n = CountArgs(src$ [, delim$ [, quote$]])
A$ = GetArg$(src$, i [, delim$ [, quote$]])


cheers,
rob :-)Edited by robert.rozee 2016-09-22
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:42pm 20 Sep 2016
Copy link to clipboard 
Print this post

Or just use a small function written in basic.
[code]
Function GetFieldArray( Record$, Delimiter$, KeepQuotes ) AS INTEGER 
  Local Index, Char, InQuote, Count    
  InQuote = 0    
  Count = 0
  FieldArray$(Count) = ""
  If Delimiter$ = "" Then Delimiter$ = ","    
  For Index = 1 To Len(Record$)    
    Char = Asc(Mid$(Record$, Index, 1))    
    If Char = 34 Then InQuote = Not InQuote    
    If Not InQuote And Instr(Delimiter$, Chr$(char)) >= 1  Then    
      Count = Count + 1    
      FieldArray$(Count) = ""
    Else    
      If Char <> 34 Or KeepQuotes Then    
        FieldArray$(Count) = FieldArray$(Count) + Chr$(char)    
      EndIf    
    EndIf    
  Next    
  GetFieldArray = Count + 1    
End Function 
[/code]
Only drawback is that the resulting array has to be global, and can not be dimensioned properly. If something would be really useful it would be a REDIM and having LBOUND and UBOUND available. Then it can all be done from basic.

With the current possibility with wifi modules to query info from the internet this becomes more necessary as parsing the result needs to be done.
The next thing that would be great is variable length strings as that in combination with parsing texts is a huge memory saver.

Maybe another approach that is very difficult to implement in basic but offers a lot of functionality when parsing text is to add a REGEX function.
There must be many c implementations available to use as an example.
You would then kill many birds with a single stone. :)

All of the above is probably a huge effort. My wish would be the REDIM/UBOUND/LBOUND as that enables a lot of algorithms to be made efficiently.

I never implemented a REGEX function before so i have no idea how difficult that would be.
Microblocks. Build with logic.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 12:38am 22 Sep 2016
Copy link to clipboard 
Print this post

  Geoffg said  

n = GetArgs(src$, delim$, array$())

Where:
n = number of delimited values found
src$ = is the source string containing the values
delim$ = is the delimiters (one or more) that separate the values
array$() = is a pre defined string array which will hold each value

So, for example:
n = GetArgs("aa,fff,78,g", ",", a$())
n would contain 4
a$(0) would contain "aa"
a$(1) would contain "fff"
a$(2) would contain "78"
etc

Would this suit everyone's needs?
Any suggestions or extensions that should be included?

Geoff


Hi geoff - see my post on a SPLIT function. It would achieve the same thing and maintain the "Microsoft" feel to the basic

cheers
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 01:00am 22 Sep 2016
Copy link to clipboard 
Print this post

Can you provide a link to this post?
Geoff Graham - http://geoffg.net
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 03:12am 22 Sep 2016
Copy link to clipboard 
Print this post

I think he means the 8:04 pm post here Geoff.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 12:57pm 22 Sep 2016
Copy link to clipboard 
Print this post

Thanks paceman.

I rather liked Robert's suggestion of:
n = CountArgs(src$, delim$)
and
A$ = GetArg$(src$, delim$, i)

They are plain and simple and in the style of BASIC. I could also add them to the long string series of embedded C routines using the same syntax.

Geoff
Geoff Graham - http://geoffg.net
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025