Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:39 26 Nov 2024 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 : [PicoMite] DIR$()  Missing dots

Author Message
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1241
Posted: 05:52pm 19 Mar 2024
Copy link to clipboard 
Print this post

Hi, I would like to know whether the removal of the "dots" from the Dir$("*",DIR) function is intended in the newer (> 5.07) firmware versions.
'************ testdir$ *********
Print "MMBasic version:" MM.Ver
Print "--------------------------------"
DirName$= Dir$("*", Dir)
Print DirName$

Do While DirName$<>""
   DirName$ = Dir$()
   If DirName$<>"" Then Print DirName$
loop

Print "--------------------------------"



Output for MMBasic version: 5.0706
MMBasic version: 5.0706
--------------------------------
.
..

nsa
--------------------------------



Output for MMBasic version: 5.09
MMBasic version: 5.090006
--------------------------------
nsa
--------------------------------

What happened to the dots and if so why?  
I think this doesn't make Picomites more compatible with other previous MMBasic versions.

Regards
Michael
Edited 2024-03-20 03:53 by twofingers
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9114
Posted: 09:06am 20 Mar 2024
Copy link to clipboard 
Print this post

FatFS is used for the SDcard system and does not return these when asked to return directories. In order to maintain compatibility between the A: and B: drives I have suppressed them for the "A:" drive. This is inline with other MMbasic variants (just confirmed on CMM2). Earlier versions of the PicoMite firmware were out of line for the A: drive

              if (lfs_info_dir.type & (LFS_TYPE_REG |  LFS_TYPE_DIR) && pattern_matching(pp, lfs_info_dir.name, 0, 0) && !(strcmp(lfs_info_dir.name,".")==0 || strcmp(lfs_info_dir.name,"..")==0 )){

Edited 2024-03-20 19:11 by matherp
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1241
Posted: 04:53pm 20 Mar 2024
Copy link to clipboard 
Print this post

Thank you very much!
It's to bad, I've gotten used to it for 40 years.
For me it was very surprising. I don't have an SD drive on the Picomite and I hadn't noticed it on the CMM2 until now. A note in the manual could be useful.
A workaround should be easy to do.

Regards
Michael
causality ≠ correlation ≠ coincidence
 
Print this page


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

© JAQ Software 2024