compile problem
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
compile problem
I'm using a .mak to load in PDS. That goes all well.
I have several things DIM SHARED or CONST, but alls those things aren't passed on somehow.
Every file which I have loaded through .mak contains the '$include-thingy, but when running the code everything which has to be loaded into the DIM SHARED or CONST is not there anymore.
This while running in PDS and even after having compile the whole thing.
Grtz
I have several things DIM SHARED or CONST, but alls those things aren't passed on somehow.
Every file which I have loaded through .mak contains the '$include-thingy, but when running the code everything which has to be loaded into the DIM SHARED or CONST is not there anymore.
This while running in PDS and even after having compile the whole thing.
Grtz
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Try Common Shared for BAS files. That works with CHAINed modules.
SHARED values are only shared inside of that module. Otherwise try using a data file that the programs can just pass the values in. Stand alone EXE files require data files, as Common Shared does not work without BRUN.EXE. Although I have never messed with PDS.
Ted
SHARED values are only shared inside of that module. Otherwise try using a data file that the programs can just pass the values in. Stand alone EXE files require data files, as Common Shared does not work without BRUN.EXE. Although I have never messed with PDS.
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
Ok I'll give that a try. I do have to say that I have a .bi-file containing the DECLARE's, DIM SHARED's, CONST's, and $INCLUDEd it in all the modules.
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
Ted, I've tried the changing DIM to COMMON and it works!! Thx mate!!
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
Alright now I'm trying to compile a lib and I get stuck at the following:
When I try to do a library compile I get the following:
Grtz
Code: Select all
FUNCTION CheckID! (ChID AS LONG)
DO
FOR a = 1 TO 15
IF PID.appshelf(a) = ChID THEN
ChID = GenID!(5)
ELSE
check = 1
END IF
NEXT
LOOP UNTIL check = 1
END FUNCTION
FUNCTION GenID! (Lenght AS INTEGER)
RANDOMIZE TIMER
FOR a = 1 TO Lenght
s$ = s$ + LTRIM$(RTRIM$(STR$(INT(9 * RND))))
NEXT
GenID! = VAL(s$)
END FUNCTION
Anyone got a clue what might the causing the problem? and how to solve this?[C:\WINNT\system32\cmd.exe - qbx qbinux /l] wrote: temp! = CheckID!(GenID!(5))
^ Parameter type mismatch
Grtz
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
ChID is defined as LONG and cannot equal a value from a single type array.
& <> !
Ted
& <> !
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
Okay, basically I have the ! & mixed up, right?
So that means that I should have this code:
So that means that I should have this code:
Code: Select all
FUNCTION CheckID& (ChID AS LONG)
DO
FOR a = 1 TO 15
IF PID.appshelf(a) = ChID THEN
ChID = GenID&(5)
ELSE
check = 1
END IF
NEXT
LOOP UNTIL check = 1
END FUNCTION
FUNCTION GenID& (Lenght AS INTEGER)
RANDOMIZE TIMER
FOR a = 1 TO Lenght
s$ = s$ + LTRIM$(RTRIM$(STR$(INT(9 * RND))))
NEXT
GenID& = VAL(s$)
END FUNCTION
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
[quote="Seb McClouth"]Okay, basically I have the ! & mixed up, right?
So that means that I should have this code:
Thx for this insight.
So that means that I should have this code:
Code: Select all
FUNCTION CheckID& (ChID AS LONG)
DO
FOR a = 1 TO 15
IF PID.appshelf(a) = ChID THEN
ChID = GenID&(5)
ELSE
check = 1
END IF
NEXT
LOOP UNTIL check = 1
END FUNCTION
FUNCTION GenID& (Lenght AS INTEGER)
RANDOMIZE TIMER
FOR a = 1 TO Lenght
s$ = s$ + LTRIM$(RTRIM$(STR$(INT(9 * RND))))
NEXT
GenID& = VAL(s$)
END FUNCTION
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
Okay, it works. But now I'm stuck with a 'COMMON in Quick library too small'. I think I know what's causing this, but how to solve it? Does any one know.
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
I've fixed this by replacing some with DIM SHARED again. Only gotten a new problem. When I try to recompile the library, which used the same .bi-file... it gives error about all the COMMON SHARED... Any ideas on how to fix this?
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.