In other words where you get 'No such variable' I get '8' (which seems to be a valid value for @char.x%). So I'm as mystified as you are and I would be interested to learn what others get when they also attempt to reproduce your finding.
Incidentally what happens if you 'compile' newprog.bbc to an EXE? That is effectively doing the same thing, but instead of executing the Run Time Engine via OSCLI it is embedding it in an executable. Does that also give 'No such variable'? Here I get '0' and '8' again.
A useful 'sanity check' would be to add a *HELP to your test program just to confirm for sure that you're running the v6.13a RTE:
Yes, adding '*HELP' indeed explains it Richard. When running in the IDE, it is version 6.13a.
I also added '*HELP' in the calling program.
The calling program reports 6.13a and the output in the 2nd window, from the called program reports 6.12a.
Both sources are in the same directory.
So I guess bbcwrun6.exe in "C:\Program Files (x86)\BBC BASIC for Windows\bbcwrun6.exe" is the previous runtime version.
Not sure what caused that as I upgraded 6.12a to 6.13a as per instructions on your site.
I'll probably try to completely remove and then install BB4W from scratch and then upgrade it to 6.13a.
hellomike wrote: ↑Fri 03 Apr 2020, 17:28
So I guess bbcwrun6.exe in "C:\Program Files (x86)\BBC BASIC for Windows\bbcwrun6.exe" is the previous runtime version.
Can you check the time stamps on bbcwin6.exe and bbcwrun6.exe, they should be the same. The only situation I can think of in which one could be upgraded but not the other is if bbcwrun6.exe was 'locked' when the upgrade process was run, for example because it was in use at the time (that's why installers almost invariably say to close all running applications first). But it's still strange.
I'll probably try to completely remove and then install BB4W from scratch and then upgrade it to 6.13a.
Please try just repeating the upgrade, I'd like to discover if it's broken.
Once again you were on the right track Richard! Throughout the day I have a program active which I hardly notice anymore!
I ran 'upgrade.exe' again with this program active and this is the DIR afterwards:
I did note that 'BBCWRUN.NEW' file but didn't pay enough attention to it as it clearly implies something isn't right.
All is well again and it was, as I predicted, entirely my own fault.
hellomike wrote: ↑Sat 04 Apr 2020, 07:51Throughout the day I have a program active which I hardly notice anymore!
So how come this program is locking bbcwrun6.exe? Are you running it using the Run Time Engine rather than 'compiling' it to an executable, and if so why? A standalone EXE ought not to have any impact on bbcwrun6.exe or the upgrade process, whether running or not.
All is well again and it was, as I predicted, entirely my own fault.
I'm a little surprised you received no warning that anything was wrong, but I may have decided that it was difficult to deliver one in a useful way via the Inno Setup installer (the upgrade process hasn't changed for many years).
.......
BB4WEXE$="""C:\Program Files (x86)\BBC BASIC for Windows\bbcwrun6.exe"" "
BB4WIDE$="""C:\Program Files (x86)\BBC BASIC for Windows\bbcwin6.exe"" "
.......
IF INKEY(-1) Cmd$=BB4WIDE$ ELSE Cmd$=BB4WEXE$
OSCLI(Cmd$ + $Path%(Item%-1) + ";")
.......
QUIT
When I'm finished with the program I close it. Often I also need to make slight changes in parameters before running and I'm too lazy to make a UI for all of them so I do it in the IDE and run it and then close it without saving the change. Therefor storing and running them compiled would not work for me.
Indeed, for that one program that stays active most of the day I could make an exception.
hellomike wrote: ↑Sat 04 Apr 2020, 14:06
For the BB4W programs that I use frequently I have a (compiled) launcher app that starts them using the OSCLI mentioned.
Do you ever run two or more of them at once (from the same launcher session)? I expect the answer is yes, but if not you could probably execute them using CHAIN prog$ or CALL prog$, in other words utilise the interpreter within the launcher app rather than bbcwrun6.exe.
Often I also need to make slight changes in parameters before running and I'm too lazy to make a UI for all of them
There is a halfway house: compile them and pass the parameters in the command line (and pick them up in @cmd$). That requires some work, but nothing like as much as adding a UI.
The sources are not all in the same directory. I seem to remember that in order to make @dir$ point to the right current directory for each program, CHAIN or CALL didn't work as @dir$ keep pointing to the launcher app or even no path in case of the @lib$ system variable.
Only launching 'bbcwrun6.exe' afresh make @dir$ en @lib$ point to the proper path for each program. The launcher app gets the absolute paths from a flat TXT file.
hellomike wrote: ↑Sat 04 Apr 2020, 21:14CHAIN or CALL didn't work as @dir$ keep pointing to the launcher app
True enough, but if there was no way around that touchide.bbc couldn't work, as it relies on being able to CHAIN a program - which might be anywhere - with @dir$ correctly set (there is no 'run time engine' on Android or iOS that it could call)! So, faced with that challenge (and being lazy), my approach would be to copy the relevant code from touchide:
Not exactly 'legitimate' code, by any means, but it works (and it's 64-bit clean).
There are of course other issues associated with using CHAIN to run a program, in such a way that the program can't tell it is being run any differently from usual (e.g. ensuring that A% to Z% are all zero) but nothing particularly difficult.