Posts: 2
Threads: 1
Joined: Nov 2022
Reputation:
0
Hi,
I am having a problem using QB64-CHAIN on an Windows XP-x86-system.
From QB 4.5 , Original, Sources. I am copying and using COM1_EX.bas and COM2_EX.bas.
The CHAIN command in COM1_EX is supposed to copy via COMMON a 1-dim-array() into COM2_EX - where however it's array-contents never arrive.
I did create COM2_EX.exe to be chained.
I also tried it with COMMON SHARED , and by using the identical variable names in both programs - no effect.
While using QB 4.5 the two programs chainig work ok.
Any ideas what may create that behavior?
Udix
Posts: 2,910
Threads: 305
Joined: Apr 2022
Reputation:
167
It seems like you did everything right. Working on a Windows system, used COMMON SHARED, and created both files.
I never used CHAIN. Back in the day. I'd create a database to pass the variables and used RUN.
You may get an answer or some dialog with another member or dev. If not or there is no fix, the easiest way to get your program working again would be to make it just one program. Paste the entire second program into a newly named sub in the first program, and just delete any duplicate definitions.
Welcome to the forums,
Pete
Posts: 4,707
Threads: 224
Joined: Apr 2022
Reputation:
322
11-01-2022, 12:46 PM
(This post was last modified: 11-01-2022, 12:53 PM by bplus.)
Didn't
@TerryRitchie also bring up this same issue in attempts to help someone update some old code?
It's no longer needed these days with nearly unlimited program size but yes QB64 does like to pride itself on preserving compatibility with old code, until v2 broke past functions working smoothly.
Combine the sources? or try Run?
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 4,707
Threads: 224
Joined: Apr 2022
Reputation:
322
Ah there's the link to Terry's thread!
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 1,098
Threads: 109
Joined: Apr 2022
Reputation:
102
Yes, I remember that discussion. It was determined that it would be best to update the code or use variables and RUN as Pete described.
Would you be willing to post the source code for all the modules? Perhaps someone could guide you on how to best approach the issue.
Posts: 520
Threads: 54
Joined: Jul 2022
Reputation:
48
The point is that CHAIN in QB64 is emulated passing value using a file..
So you can decide
1. to do it by yourself (using a temporary file to pass value between 2 programs)
2.or code correctly and QB64 does it for you...but there is no direct access to RAM, only data stored in a file and read from the second program
3. you can use in Windows 10 and Linux SO the solution posted by Sprigssy
For a more specific counselling you must share code