|
Post by honky on Jul 5, 2021 15:06:21 GMT
Hello, how to launch the JB editor with a file: ". Bas" in it? I have the path of JB: JBexe$ = "d:\Documents and Settings\Roro\Mes documents\0ABB\Just BASIC v2.0\jbasic.exe" I have the file path: fileName$ = "D: \ Documents and Settings Roro\My documents\0ABB\shell.bas" I do: RUN JBexe$; fileName$ And it doesn't work, why?, thank for
|
|
|
Post by xxgeek on Jul 5, 2021 16:49:02 GMT
try
RUN JBexe$;" ";fileName$
|
|
|
Post by tenochtitlanuk on Jul 5, 2021 17:40:23 GMT
... and it helps to specifically put in the quote symbols ( '"') with chr$( 34) On my machine, paths are different ( under Linux) but this works for me.
JBexe$ = "C:\Program Files (x86)\Just BASIC v2.0\jbasic.exe" fileName$ = "C:\users\john\Application Data\Just BASIC v2.0\helloWorld.bas"
run chr$( 34) + JBexe$ +chr$( 34) + " " + chr$(34) + fileName$ + chr$( 34)
|
|
|
Post by xxgeek on Jul 5, 2021 18:16:40 GMT
... and it helps to specifically put in the quote symbols ( '"') with chr$( 34) On my machine, paths are different ( under Linux) but this works for me. JBexe$ = "C:\Program Files (x86)\Just BASIC v2.0\jbasic.exe" fileName$ = "C:\users\john\Application Data\Just BASIC v2.0\helloWorld.bas"
run chr$( 34) + JBexe$ +chr$( 34) + " " + chr$(34) + fileName$ + chr$( 34)
According to the help files: RUN "JBASIC PROG.BAS" - is the correct syntax I have found that the quotes aren't needed when variables are used for the names. An example from my program' RUN JBpath$;"\";JBexe$;" -T -A ";DestPath1$;"\";fname0$ Only needed quotes around any text in the line. Whatever works is the best way :0
|
|
|
Post by Rod on Jul 6, 2021 6:37:44 GMT
The help file does not cover trailing arguments. The problem is that if there are spaces within the trailing argument Windows breaks the line and does not see past the space character. Unless the whole argument is wrapped in chr$(34). You will come across the problem at some point.
|
|
|
Post by honky on Jul 6, 2021 8:52:56 GMT
Thank you very much tenochtitlanuk your solution works.
|
|
|
Post by xxgeek on Jul 6, 2021 18:16:53 GMT
The help file does not cover trailing arguments. The problem is that if there are spaces within the trailing argument Windows breaks the line and does not see past the space character. Unless the whole argument is wrapped in chr$(34). You will come across the problem at some point. Thanks for mentioning this. I'm sure I will come across the need to use arguments at some point. i hope I remember this tip when I do. lol
|
|