HELP TO RUN QBASIC CODE FROM 90s ! - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: HELP TO RUN QBASIC CODE FROM 90s ! (/showthread.php?tid=2791) Pages:
1
2
|
HELP TO RUN QBASIC CODE FROM 90s ! - musss1 - 06-10-2024 Hello everyone, I am having a hard time trying to run a code, (which I copied and pasted from a PDF text book ^^), The program was written in Microsoft QuickBASIC for Apple Macintosh, so i investigated a little and close to that i found QB64 programing languaje , i dont know if the syntax is the same, but the file (.bas), gets executed, If someone can help me resolve the problem, I would appreciate it. ♥ I am leaving the link to the GitHub repository if you want to download the files and try them out yourselves. its strange because the code is from a book, So it shouldn't be an issue ! I am also attaching a video with two images, showing what happens when I try to run the code completely! link to github : https://github.com/musss1s/programingQBASIC.git first image : The main program, calls the file "uflo.dat",which i highlighted in yellow, it stores numbers in a 21x41 array format, with 21 columns and each column containing 41 numbers, separated by commas. I = 21 and J = 41. It is used to perform some calculations for sonic and subsonic flow, "gas dynamics." second image: i marked in red where the syntaxis problem is reference video: the code should look like this : please help !!! thank you guys RE: HELP TO RUN QBASIC CODE FROM 90s ! - Jack - 06-10-2024 hello musss1 the error occurs in the Sub PORT, a subscript out of range occurs I inserted some print statements Code: (Select All)
this is the output Quote:AK= .9 I= 18in the fifth call to Sub PORT AK and I are NaN, you obviously need to investigate why that happens RE: HELP TO RUN QBASIC CODE FROM 90s ! - luke - 06-10-2024 On line 752: Code: (Select All) CALL FPORT(HTDC, HIOT, INHT, FIPRT, FIPRT, AKI, CCI) Perhaps the code was copied from the PDF wrongly? I had a quick look and couldn't see any FIPRT assignment though. RE: HELP TO RUN QBASIC CODE FROM 90s ! - Jack - 06-10-2024 I think that it's from the book "The Basic Design Of Two Stroke Engines" by Gordon P. Blair http://offshore-rc.com/forum/Ancien%20Serveur%20Loops/Marc/Litterature/The_Basic_Design_of_Two_Stroke_Engines_1560910089.pdf I searched the web to see if by chance someone had posted the code but no luck RE: HELP TO RUN QBASIC CODE FROM 90s ! - justsomeguy - 06-10-2024 Found an error here that differed from the printout. Its around line 77. Code: (Select All)
RE: HELP TO RUN QBASIC CODE FROM 90s ! - Jack - 06-10-2024 @justsomeguy your change made it work, but the graph doesn't match with the one in OP, perhaps that graph is from a different program or the data file differs RE: HELP TO RUN QBASIC CODE FROM 90s ! - justsomeguy - 06-10-2024 I did not do an exhaustive search for typos, but since what I found was a typo, it implies that there could be more. RE: HELP TO RUN QBASIC CODE FROM 90s ! - musss1 - 06-10-2024 (06-10-2024, 01:26 PM)Jack Wrote: I think that it's from the book "The Basic Design Of Two Stroke Engines" by Gordon P. BlairHey, YES I left the code in the GitHub repository, and the pdf but just in case it doesn't show up or something, I'll leave the Mega link here for you to check! thanks a lot ! https://mega.nz/file/Zh5AHTrB#bnscAhu5ZxmVev98hS4Rmi_RF0GpdV__Lu12RAxt2pM RE: HELP TO RUN QBASIC CODE FROM 90s ! - justsomeguy - 06-10-2024 In Line 333 you might adjust the 'LOCATE 25,28' -> 'LOCATE 25,33' because PMAX is overwritten by the following line. Code: (Select All)
RE: HELP TO RUN QBASIC CODE FROM 90s ! - musss1 - 06-10-2024 (06-10-2024, 04:13 PM)justsomeguy Wrote: In Line 333 you might adjust the 'LOCATE 25,28' -> 'LOCATE 25,33' because PMAX is overwritten by the following line.gotcha |