Hello,
I was writing some code and after 1 hour, I decided to look at GCStudio manual for reference about the
Gosub / Return command and from the manual example page : 192 I've got an error as "Missing Sub Definition".
Maybe the compiler or something else is not up to date.
#optionexplicit#chip16F628A,4'Change this to suit your circuit #define SOUNDOUT PORTA.4 #define LIGHT PORTB.0 Dir LIGHT Out Do'Flash Light PulseOut LIGHT, 1 s Wait 1 s'Beep Gosub PlayBeep Loop PlayBeep: Tone 200, 10 Tone 100, 10 Return
I will have just sorted this out in the compiler. The compiler was looking for a SUB definition. As I tighten up the syntax these issues can arise.
Download this fix. You will have to accept the warning from your Browser, and, you may have to UNBLOCK in the properties of the downloaded file. Then, replace your existing EXE.
;gosub#option explicit#chip tiny10, 1;-----Includelibrary#include<SoftSerial.h>;-----ConfigSerialUARTforsending:#define SER1_BAUD 4800 ; baudrate must be defined#define SER1_TXPORT PORTB ; I/O port (without .bit) must be defined#define SER1_TXPIN 0 ; portbit must be defined#define SER1_INVERT OnDimCountasbyteDimCount1asbytepause1000;BackLightOn/Offser1send255;BackLightOnpause1ser1send8;8=On,0=Offpause1DO;CountCharforcount=128to167Count1=count-80gosubmainnextforcount=192to231Count1=count-104gosubmainnextpause1000;ClearLCDser1send254pause1ser1send1pause1pause1000loopMain:ser1send254pause1Ser1Sendcountpause1Ser1SendCount1pause1return
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I was writing some code and after 1 hour, I decided to look at GCStudio manual for reference about the
Gosub / Return command and from the manual example page : 192 I've got an error as "Missing Sub Definition".
Maybe the compiler or something else is not up to date.
Good spot.
I will have just sorted this out in the compiler. The compiler was looking for a SUB definition. As I tighten up the syntax these issues can arise.
Download this fix. You will have to accept the warning from your Browser, and, you may have to UNBLOCK in the properties of the downloaded file. Then, replace your existing EXE.
http://gcbasic.sourceforge.net/newfiles/gcbasic.exe?latest=1
Can't get the download, does'nt respond on Chrome.
don't rush, I'll get on the next GCStudio update.
Thanks Evan.
Try changing the http to https
Was able download and copy to "C:\GCstudio\gcbasic\gcbasic.exe"
tried the same code but's not working.
You will have to copy the new exe over gcbasic.exe and gcbasic64.exe. If you do not and you Starr or restart GCSTUDIO will restore the old version.
It compiled but I eard 2 beep while compiling is this normal.
My error... I uploaded the wrong exe...
https://gcbasic.sourceforge.net/newfiles/gcbasic.exe?latest=1 and https://gcbasic.sourceforge.net/newfiles/gcbasic64.exe?latest=1
If you are running on 32 bit.. copy the new gcbasic.exe to gcbasic32.exe
Then, try again.
Last edit: Anobium 2024-04-26
can't download the 64,
An error has been encountered in accessing this page.
A typo - try the link again.
link worked ,
still error:
Attach the code please. I would be guessing without it.
I have resolved. I have change the testing.
https://gcbasic.sourceforge.net/newfiles/gcbasic.exe?latest=1 and https://gcbasic.sourceforge.net/newfiles/gcbasic64.exe?latest=1
GCBASIC (2024.4.26 (Windows 64 bit) : Build 1386)
Test, try again.
Ecxellent it's working !
Excellent. Another improvement.
Many thanks Evan.