BBC BASIC
« *CD in Android »

Welcome Guest. Please Login or Register.
Mar 31st, 2018, 11:00pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Cross-platform BBC BASIC (Windows, Linux x86, Mac OS-X, Android, iOS, Raspberry Pi)
BBC BASIC Resources
BBC BASIC Help Documentation
BBC BASIC for Windows Home Page
BBC BASIC Programmers' Reference
BBC BASIC Beginners' Tutorial
BBC BASIC for SDL 2.0 Home Page
BBC BASIC Discussion Group

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: *CD in Android  (Read 476 times)
jgharston
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: *CD in Android
« Reply #1 on: Oct 13th, 2017, 11:28pm »

on Jan 14th, 2016, 2:55pm, Richard Russell wrote:
So for example if you currently use OPENIN("filename") change it to OPENIN(@dir$+"filename"). This should ensure compatibility across all platforms.

Except if you're writing a file navigator, as was the first bit of "real code" I was experimenting with today. Eg:

OSCLI "CD "+destination$
*.*.*
INPUT "File: "A$
CHAIN A$

Non-Android (ok, I've only tried Windows, RISCOS and BBC) chain the file you can see, Android tries to find a file hidden behind the mystery door (I think in /mnt).

Doing CHAIN @dir+A$ results in always looking for a file in the directory the executing program was launched from, not the one you're looking at.

...more investigation needed.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: *CD in Android
« Reply #2 on: Oct 14th, 2017, 08:32am »

on Oct 13th, 2017, 11:28pm, jgharston wrote:
Doing CHAIN @dir+A$ results in always looking for a file in the directory the executing program was launched from

Well, not "was launched from" but "is stored in" (which is what @dir$ means). You took my comment too literally: when suggesting @dir$+filename$ I was of course using that as an example of a fully-qualified (absolute) path. You could use @usr$ or @tmp$ or @lib$ - or a path specified relative to one of those - and it would work just as well. It's just that in Android you cannot pass a relative path (which by definition means 'relative to the Current Directory') since there is no 'Current Directory'.

There is no need for any "investigation", that's how Android works. It's good practice to use absolute paths on all platforms so it shouldn't be an onerous requirement.

Richard.
« Last Edit: Oct 14th, 2017, 12:36pm by Richard Russell » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls