SHELL and QB64by qbguy (no login)http://www.network54.com/Forum/585676/message/1198433550/QB64+Questions+%28Mac-Linux+Compatiblilty%2C+etc.%29 http://www.network54.com/Forum/585676/message/1204178963/I%27m+not+sure+if+they%27ve+resolved+some+issues+involving+shell Discuss your ideas. from IP address 75.49.116.62 |
* I thought we already did. ;-)by XO-"Web Master"-Jones (no login)from IP address 4.246.3.129 |
RE: SHELLby (no login)SHELL will be implemented soon. At first it will simply be a pure call to the OS, which means commands like "dir /b *.bmp" will fail under Linux & Mac. This is very easy to add. Later, the string will be interpreted and if it is a simple command like DIR... the Linux/Mac equivalent will be used instead. To avoid possible misinterpretation of a command (eg. In Linux you could have a file called DIR.EXE you want to run) there will be a way to make a pure shell call as well. To support multi-OS/multi-platform code, QB64 will also have a function which returns the operating system a program has been compiled for. from IP address 58.110.128.68 |
* But is there an equivalent for DIR in Linux, with all the options?by XO-"Green"-Tim (no login)from IP address 4.246.6.111 |
Don't parse SHELL commandsby (no login)For those programs that want stuff like DIR to work, they can use FILES, KILL, CHDIR, MKDIR, RMDIR, and maybe some new stuff (that I thought QBasic had), like _RENAME (file or dir). Being that those are QBasic commands, you should make them work on all supported operating system. With those already in place, there is no need to make "guesses" at SHELL commands. For old programs that use DOS specific commands, programmers know that it will have to be changed in order to work, but it won't have to be totally rewritten, just altered to use the QBasic commands instead of SHELL calls. PhyloGenesis from IP address 71.102.249.174 |
* That would be good or maybe a function _UNIXOS to decide if its a Unix shell or notby qbguy (no login)from IP address 75.49.116.62 |
I've already stated why, so I won't repeat it here. Just go to the links found at the end of this post to see why I believe this [1] and why I feel certain incompatibilities may cause issues [2]. As for things like _RENAME, I feel that at least something like _MOVE should be implemented. You can rename files/directories in Windows just as you can in Linux - use the move (mv in Linux) command. Really I have no idea why REN is there in Windows. It makes as much sense as using move to do the same thing because it uses most of the same code, I'm guessing. However, _RENAME is more semantic in that you aren't actually moving the file's location; you're merely changing the file name. With that in mind, I'm not against having a _RENAME command in QB64, but I do think that _MOVE should be implemented at some point. I can see one reason for _COPY/_MOVE/_RENAME not existing is because of the fact that they could be done via OPEN FILE FOR BINARY AS #n and use one file for input and the other for output. A copy function would be the same as a move function except that the move function would need to KILL (delete) the original file. A rename function would be done...either with SHELL commands or using the same idea as a move function. Back in the DOS days, moving a file might have been slow. I don't think that is quite the case today, however. Just my thoughts... It isn't like I'm demanding anything because I realize Galleon is the only coder at this point. That brings a question to mind - are we talking about this prematurely? I'm worried that Galleon will feel rushed. [1] - http://www.network54.com/Forum/585676/message/1204182292/You+have+a+very+good+point. [2] - http://www.network54.com/Forum/585676/message/1204256939/My+ideas... ------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
_RENAME???by XO-"Noname"-Bob (no login)QB has a NAME command already, right? :(o.O); And other versions of QB / PDS / VB probably have built-in commands for the other, most popular SHELL commands (KILL, MOVE, DIR, etc.), although I'm not sure. from IP address 4.246.6.145 |
Ah, yes, that's what it was called. My point was that with those built-in popular SHELL commands, there is no need to parse SHELL for popular commands, if one wants to do that, just use the built-in commands. PhyloGenesis ------------------------ "For each programmer, there is an equal and opposite programmer who can't stand to read the first programmer's code." - Snook from IP address 71.204.157.84 |
Definitelyby XO-"DST"-Clockmaster (no login)Also, if QB64 attempts to parse commands, programmers will still have to test for the OS their program is using, and base the SHELL commands on the way QB64 interprets commands, not the way the real OS does. :-) from IP address 4.246.6.145 |
*Oh geeze, Galleon already said QB64 will know the OS!by (Login burger2227)R from IP address 71.60.226.47 |
XO is referring to something like: IF _OS = "Win32" OR _OS = "Win64" THEN 'Windows stuff ELSEIF _OS = "Linux" THEN 'Linux stuff END IF That is what he was referring to by "test for the OS their program is using". As for basing the SHELL commands on the QB64 interpretation rather than the way that the command shell handles it automatically, that is also true. In Linux, you can type: ls -lah which is like typing the following in Windows: ls -l -a -h The reason that can be done is because of the fact that they are all single-character arguments which take no arguments of their own, and the `ls' program understands how to interpret the argument. To interpret that would be a pain. Also, for things like GNU tar, the `-' character isn't necessarily required: tar xvjf gcc-4.2.3.tar.bz2 -C /usr/local/src tar -x -v -j -f gcc-4.2.3.tar.bz2 -C /usr/local/src Both do the same thing. The first is just shorter to type. Note that in -f <argument>, <argument> is the file to operate on, whether it is creation, extraction, etc. In other words, that is why it got broken up. Also, the `-' character is now required because if it was: tar xvjf gcc-4.2.3.tar.bz2 C /usr/local/src then `C' and `/usr/local/src' would both be treated as files. In this case, they would name files to extract. That is the reason why I don't like the idea of SHELL being interpreted. It is up to Galleon, of course. I suppose the Linux port could simply not interpret SHELL while the Windows one interprets SHELL. Not everything is going to be 100% the same. :P ------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
Weird... I wonder why it is NAME instead of RENAME? That isn't very intuitive... KILL is already in QB, just like CHDIR, MKDIR and RMDIR. However, no MOVE or COPY statements exist in QB/PDS. VB has FileCopy, which is where FB got it. However, a MOVE function (or FileMove?) would be done via the "FileCopy src dest : Kill src" idea. I wonder if NAME is something found only in the Microsoft dialects of the BASIC language... It certainly wasn't found in Dartmouth BASIC! I can't dig up anything on Altair BASIC. The first point I know about it existing is in BASICA or the slightly earlier Microsoft BASIC. Anyway, NAME is there. Since it exists in QB, it should also exist in QB64, right? As for a file movement and file copy feature, that isn't necessary, but it would make things slightly easier. ------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
* Yes folks, let's let Galleon get QB64 running QB code first!by (Login burger2227)R from IP address 71.60.226.47 |
there is no good way for the QBASIC program to recover the data. The only 2 ways I can think of are to read the screen and parse the results, or prompt the user, both of which assume that the necessary info hasn't scrolled off the screen. shelling to DIR gives the QBASIC 1.1 program much more control; the output can be redirected to a file. There are MS-DOS Int 0x21 functions to search for files. These would be useful in QBASIC 1.1 I hope QB64 adds built in file search and file existence testing capability. (Maybe even permissions/access info?). CHDIR is usable, but I don't think there is any built in way to change the current drive... Regards, Michael
from IP address 12.183.134.41 |
Ahem... I use FILES... More Stupid QB Tricks by David Coderman.by Pete (Login The-Universe)R I use it to trick the system into showing the current directory without using SHELL. Just uses FILES "xxx.9~0" (A file that doesn't exist and error trap the error 53. Use a RETURN NEXT to keep the program going and then just read the current directory with a CHR$(SCREEN(CSRLIN, POS(0)) statement. Stick that in your lousy code bucko and smoke it. Oops, sorry, it's late and I'm possessed by Clippy again. Pete
from IP address 70.177.5.114 |
from IP address 12.183.134.41 |
* Leave that freaking Clippy alone! He been good lately.by XO-Green Weenie (Login burger2227)R from IP address 71.60.226.47 |
* No you haven't, impersonator!by XO-FBI-Master (no login)from IP address 4.246.0.158 |
------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
CHDRIVE is a simple Interrupt routineby (Login burger2227)R SUB ChgDrive (Drive$) STATIC 'changes to a drive letter Regs.ax = &HE00 Regs.DX = ASC(UCASE$(Drive$)) - 65 CALL INTERRUPT(&H21, Regs, Regs) END SUB Ted
from IP address 71.60.226.47 |
As I write this post...by (no login)...the QB64 compiler is compiling itself! Because it uses a file to store and reference all "names" the more "names" that get added throughout the compilation the longer it takes to find each name. Guess what the first thing I'll be changing is. ;) Anyway, if all goes well I'll have a stable C++ version of COMPILE.BAS in approx. 3 hours time. I waiting for the next version of QB64 too, Galleon from IP address 58.110.128.68 |
ZZZZZzzzzz.....by (no login)QB64 COMPILER V0.60 COMPILE (.BAS)>c:\dqbsvga4\comp64................................. Well, I'm off to bed! PS. Had to redo the compile process a couple of times because of stupid oversights. It's still compiling now. from IP address 58.110.128.68 |
To cut a long story short...by (no login)...it got more than half way through the 9000+ lines of code (after approx. half an hour) but then encountered an error. The great news is the error is the mentioned in readme.txt to do with sometimes not identifying variable names correctly and now I know why it occurs. It'll be a very easy bug to fix. Some technical info: DIM a$ is NOT the same as DIM a AS STRING Galleon from IP address 58.110.128.68 |
I hope you don't feel under any timeline pressure...by Pete (Login The-Universe)R I'm really impatient but amazingly enough I put up with a lot of debugging with some of my larger apps. A few years ago I nearly felt like quantifying an equation that would attempt to explain an exponential increase in debugging time as well as coding any necessary changes, modifications, and adjustments for every time the source code is increased. Long programs that will be used by others also require constant improvements to documentation along with tutorials, web-sites, promotion, etc. That's a lot of hats for any one person to wear at one time. So long story short.. I'm not giving up on QB64, I'm just giving it good thoughts and the time you need to get the previous bugs fixed and the current compiler... compiled. Best wishes, Pete from IP address 70.177.5.114 |
Getting closer!by (no login)It took approx. 2 hours and it was about 99% of the way through compiling when I got an unexpected internal compiler error. Most frustrating, but getting very close to the goal of self compilation. QB64 COMPILER V0.60 COMPILE (.BAS)>comp64........................................................... .................... UNEXPECTED INTERNAL COMPILER ERROR! Caused by (or after):SUB QB64ERROR ( INFO$ ) LINE 9018:SUB qb64error (info$) PS. Ironic how the error occurred whilst trying to compile the entry for the sub which displays an error! from IP address 58.110.128.68 |
------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
Now we're talking!by (no login)QB64 COMPILER V0.60 COMPILE (.BAS)>comp64........................................................... ....................... COMPILING C++ CODE INTO EXE... from IP address 58.110.128.68 |
* Great Galleon! Just what the doctor ordered!by (Login burger2227)R from IP address 71.60.226.47 |
* tic-toc-tic-toc-tic-toc... Call me when the cake's ready.by Pete (Login The-Universe)R from IP address 70.177.5.114 |
Spot the difference? (includes screenshot & info. about critical bugs)by (no login)http://img85.imageshack.us/img85/3329/spotdiffin1.png Fun and games aside, there have been some very serious problems I've found (related to Demo #6) which I should share: 1. Sometimes type errors occur when creating temp. variables to aid the passing of values to subs/functions where a float is created instead of a long. This usually results in the C compiler spitting out heaps of errors related to a variable called pass??? where ??? is a number. 2. In some cases (yet to be fully investigated) local variables in a sub/function are created by QB64 using a global name, so later references to the local name are not recognised as existing by the C compiler. An example of this error is: ..\temp\main.txt:33841: error: `_FUNC_SEPERATEARGS_LONG_IDXCOST' undeclared (first use this function) 3. Using END inside a sub/function creates the following error when compiling the C++ code: ..\temp\main.txt:40698: error: label `program_finished' used but not defined 4. The OPEN statement had a typo added which causes it to i) be unstable and ii) not function correctly. The typo was easy to correct. All in all, I'd recommend everyone wait for me to release version 0.61SC which will fix the above errors and allow the use of EXIT SUB and EXIT FUNCTION. I can't say exactly when 0.61SC will be released. If all goes really well, 2 days time, if not, a week. QB64 is now self compiled (as the screen-shot shows) but it is still not working properly yet. I'm happy about the road QB64 is going down. By self compiling the compiler will be exponentially faster and overcome the frustrating and buggy limitations of dos QB compilation. The bugs I've uncovered are serious but when addressed will make QB64 more stable and robust than ever, and if I hadn't tried self-compilation it would have been a long time until they were found. I'll keep you updated as always and appreciate everyone's support, Galleon from IP address 58.110.128.68 |
It's that Star Wars program that's screwing you up dude. Switch to Star Trek for success!by Pete (Login The-Universe)R Star Trek compiles at warp speed. With StarWars.bas, you have to 'force' it to work! Fun and games aside, I wish you the best of debugging and just just as a suggestion, why not call it version 6 re-release, instead? I mean no one's really counting, are they? And that way, you won't have to suffer the Karma of v 6.1, v 6.2, etc. The self-compiled version should be great for speed sake and make it much easier to test larger apps for impatient defined types like me! I think you made another outstanding decision self-compiling it at this time. Pete PS Don't burn the cake! from IP address 70.177.5.114 |
telnet towel.blinkenlights.nl ------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
* @"The compiler will be exponentially faster" But I thought QB was the faster compiler?by XO-WiFi-Master (no login)from IP address 4.246.0.123 |
* The QB to C translation program runs faster in QB64 than in QB 7.1by qbguy (no login)from IP address 75.16.119.241 |
Another bug in Demo 6by (no login)A variable's name by itself in a DO WHILE statement compiles fine but goes into an infinite loop when the program is run. This bug was present in Demo 5 too but went unreported. Example of the bug: x=100 DO WHILE x x=x-1 LOOP Example of a workaround: x=100 DO WHILE x+0 x=x-1 LOOP from IP address 58.110.128.68 |
and another...by (no login)Changing the value of the counter variable in a FOR-NEXT loop doesn't affect the value being incremented by the FOR-NEXT loop and hence doesn't change how many more loops it will do. Furthermore the value of the counter variable is "reset" to what it "should be" after every loop. This bug affects all released QB64 demos. from IP address 58.110.128.68 |
about the bugs ; )by (no login)The good news: The bugs mentioned above meant that after the compiler self-compiled it didn't work properly, but the above bugs have now all been fixed, so the version of QB64 I'm working on is more stable (better) than ever! The bad news: There is still another (and possibly more? I've found after fixing one bug I sometimes find other unrelated ones) bugs which need to be fixed before the compiled compiler can compile all the samples correctly. It shouldn't take too long to fix though. The only sample it currently compiles correctly is FLRMP.BAS, but even this is an achievement and means most of the stuff is working right. So what's the latest bug? When passing array elements of the same type as a sub/function's input variable it is passed by value and not by reference/offset. So the array element is not updated when the sub changes its variable. Example: DIM a(100) AS INTEGER mysub a(1) PRINT a(1) '---------------------------- SUB mysub (B AS INTEGER) B=50 END SUB Expect Demo version 0.61SC (the SC stands for self compiled!) to be released in a few days if all goes according to plan, Galleon PS. The self-compiled version of QB64 compiles much faster than the QB compiled .EXE, and I haven't even begun to optimize by taking advantage of more available memory. I doubt compilation speed will be noticeably different from commercial compilers after I make these simple changes. from IP address 58.110.128.68 |
from IP address 12.183.134.48 |
*The next QB64 demo's compiler will be self-compiledby (no login)from IP address 58.110.128.68 |
Will conclude, that the source of #7 will be published and a Linuxversion already exists?by Jenklo (no login)from IP address 217.86.169.199 |
* Sorry, don't draw any Linux conclusions just yetby (Login burger2227)R from IP address 71.60.226.47 |
RE: that the source of #7 will be published and a Linuxversion already exists?by (no login)No Linux version exists yet, however if enough are interested I'm willing to distribute the C++ code (compiled from COMBILE.BAS) so that someone else can turn it into a Linux version. I don't think QB64's current level of development warrants the time it would take for me to manage both versions. I'm reluctant to release the source .BAS for COMPILE.EXE until QB64 can at least handle most QBASIC code (like user defined types). Expect the source release later this year. Good questions Jenklo, Galleon from IP address 58.110.128.68 |
Personally, I am not sure which way would be the best. Do you release the source now to allow a Linux developer to become familiar early on, so that it can be better managed later on? Or do you wait to release the source to ensure stability of the code? I'd be rather interested in seeing a Linux port. Maybe it is time to begin a poll or survey to see how much interest is generated around a Linux version? Also, that could help further the Curses implementation for those that want to use the console instead of SDL. from IP address 12.208.126.190 |
* I'm not sure what that Linux Club sub-forum is for, but it might mean something. :-Pby XO-Green-Machine (no login)from IP address 4.246.6.52 |
I have come to the sad conclusion that Galleon only has 2 typing handsby (Login burger2227)R For a while there, he was pumping out code at a good clip, but QB64 is not his only concern in life. If anybody wants to help with a Linux version, I am sure he would appreciate the help. This project has a long road ahead of it without tossing in extra stuff already. Your help and patience is what he needs now. Ted from IP address 71.60.226.47 |
What happened to "don't draw any linux conclusion just yet)? ;-)by (Login MystikShadows)R That was good and when you think about, since QB64's goal is to work in Vista, not sure what Linux has to do with anything until that first goal is met ;-). Ok, To ease the reading experience, I will break this reply into three sections. The QB64 project section (below), the Source Code section (below that one) and finally, the linux port section. QB64 PROJECT WISE: Though we're free to talk about what QB64 should do, anything that pertains to QB Compatibility per se. Hence, if select case, SHELL and others need to be discussed, yeah now is the time since this is what QB Compatibility is all about, the language. But even the whole _RangeOfAddOnsFunctions() could be discussed/suggested, that's fine, but nothing should be expected to be added, not yet, as add ons, so far, come after QB Compatibility itself, which is THE way to go :-). One list (and only one list), somewhere should exist entitled "What really will go in" or something like that and that list should be updated when need be (hence when Galleon concludes that a given suggestion warrants integration to the current code base. Galleon really does have two hands and so far it's amazing what he managed to do, my hat is off to him. But being the only developer does have it's advantage as far as keeping the focus of the project where it needs to be. That too so far has been proven throughout all first 6 demos that got released. Sure, some things may take longer (maybe due to just two hands typing, other may be dependent on other language features being available first. If there's one thing the QB64 Project has consistently shown thus far is it's direction and purpose. Galleon has a vision and a direction for his project and so far he's sticking to it. Which is great, which is Demo $6 is so good and why demo #7 promises to be that much better as per the goal of the project as well as the fact that he seems excellent at detecting what needs to be done before a given functionality can be implemented. As long as people realize that what they suggest shouldn't be considered part of a release until after Galleon says it will go in. You might not know that to add this or that feature, a certain number of other features need to be coded in first (should he decide to add the feature in the first place). I think that since Galleon ultimately decides what goes in and when, it helps him make sure that QB64's ultimate goal is respected and gets priority over any add ons. Perhaps some different things will be implemented maybe because galleon needs it (specifically now that Demo #7 will aim to self compile, so those too will appear. <---- Pete's Pop Stand ----> ;-) SOURCE CODE: Personally, I think releasing any source code right now is overkill, whether you release C++ or BASIC code. I agree with Galleon here, there's no real reason to release the source code at least until QB64 can compile itself. Personally I would wait till we're at (or very close to) version 1.0 release candidate :-). It's just too early for source code to be of any use and will only open up some "Fresh cans of worms" namely: 1. I see confusion setting in. People tempted to help Galleon by trying to debug. A very nice helping effort that can and probably will lead to loss of control over the codebase. This can have the effect of regressing the project more than helping it move forward. 2. I can see plenty of opportunities for code criticism by anyone and everyone that happens to think they can do things better, faster, quicker and/or smaller. I think it just opens door to make comments and wast Galleon's time in replying to useless posts instead of bringing the project forward in that same time. It's easy to say "nah, I'd never do that" and maybe those people wouldn't. But I wouldn't rule out everyone that pops on network54 out of this equation just yet. <-- Clippy's Hotdog Stand --> THE LINUX PORT: Well, as of today it doesn't exist and I'm glad it doesn't, not because I don't want a linux port, but because in my opinion, it's much better to port a stable working version of a project to other OS rather than fall into the chaos of porting 1/2 way done incomplete code to other platforms and then suddenly falling with Os x CodeBases to main and fix and stabilize and take 2 tylenols extra strength every 4 hours every time you sit down to code anything on any OS. Now, I'm answering for myself here, so far, from my observations here, I think I can "assume" that Galleon has a similar idea about porting efforts. Sure linux or Mac users have to wait, but to them I say: "Do you want to have a non working thing to use now, or a stable and reliable working product to use later?". I for one will probably always favor waiting to get something better. Like the old saying says: "Any good thing is worth waiting for." This goes double for projects like this one. ;-) My two cents. :-) from IP address 69.205.201.142 |
* $6? I thought it was free. Switch to the UK keyboard or something.by qbguy (no login)from IP address 75.0.234.25 |
* Then it will be too heavy. :-Pby XO-Green-Machine (no login)from IP address 4.246.6.52 |
<-- Clippy's Hotdog Stand -->by (Login burger2227)R I have the biggest weiners allowed by law! But I digress(Dave who?)! Galleon started this **** and he WILL finish it dammit! Let the man do what he has to do and keep all of that "other stuff" for later. That is one reason that I think FB is still a work in progress for over 5 years. Too many people wanted too much of the extras before it was realistically designed! The same people are the "leaders" at FB. Like Galleon and I have said MANY times, the goal here is NOT to take anything away from FB! The goal is to make the "hokey QB language" available on 64 bit computers. This is no small feat for a project being done by ONE person! I admire his effort! Ted from IP address 71.60.226.47 |
* 5 years? I thought it was ~3 years. {o.O}by XO-Green-Machine (no login)from IP address 4.246.6.52 |
.18 years going by the latest version numberby (Login burger2227)R It is still not released as a finished version. Which would be FB 1.0 Such is progress and the NEW age of computing.......... from IP address 71.60.226.47 |
* Version numbers don't mean anything.by XO-Green-Machine (no login)(Seriously, more features have been added from .15 to .18 than you can comprehend. :-P) from IP address 4.246.6.182 |
* I'd like to see this! :-)by XO-Green-Machine (no login)from IP address 4.246.6.52 |
COMMAND$ dion't workby Stenley (no login)COMMAND$ is not in the list of the not-supported commands. I tried it out with PRINT COMMAND$ and run the program with C:\>program.exe Hello World but it gives nothing out. from IP address 217.86.169.199 |
* Sorry. Not added yetby (Login burger2227)R from IP address 71.60.226.47 |
*Yes, COMMAND$ hasn't been implemented yet (it should have been listed)by (no login)from IP address 58.110.128.68 |
* Then how does QB64 use the filename argument?by XO-"Sleuth"-Jet (no login)from IP address 4.246.6.145 |
More BUGS please! (seriously)by (no login)I'm making a list of bugs/problems to fix for Demo #7. If a bug has already been mentioned on the forum or in readme.txt of the download, you needn't repeat it here. But, if you do find (or have found) something weird now is the time to report it so I can fix it. If you've got a program you think SHOULD compile/run (given the limitations of mentioned in readme.txt of Demo #6) but don't know what the problem is, feel free to post a link to it and I'll do the hard work. Thanks, Galleon from IP address 58.110.128.68 |
=Code= PRINT USING "#"; 2 =Result of compilation= QB64 COMPILER V0.60 COMPILING C++ CODE INTO EXE... In file included from qbx.cpp:9076: ..\temp\main.txt: In function `int QBMAIN(void*)': ..\temp\main.txt:4: error: `__SINGLE_USINGqbs_new_txt_len' undeclared (first use this function) ..\temp\main.txt:4: error: (Each undeclared identifier is reported only once for each function it appears in.) C++ COMPILATION FAILED! It happens with any USING string, including an empty string: PRINT USING ""; ------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
*QBguy had to remove it from one of his programsby (Login burger2227)R from IP address 71.60.226.47 |
*PRINT USING is not implemented yetby (no login)from IP address 58.110.128.68 |
* That's an odd error message. :-Pby OLPC (no login)from IP address 4.246.6.44 |
*No, You are ODD!by (Login burger2227)R from IP address 71.60.226.47 |
* I know... no one else here knows English. (o . O);by OLPC (no login)from IP address 4.246.6.44 |
(just my opinion) ------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
*We do not need any help, we are making a good job of deforming it ourselves. lolby roy (no login)* from IP address 82.18.11.35 |
I was unable to compile two of the sample programs, for each of these I got an out of stack space error. 3dballs.bas xwing.bas (MS XP Sp2, 1.7Ghz, 512MB RAM) xwing.bas gives me: "Out of stack space in line No line number in module MODULE2 at address 2641:0054" 3dballs.bas immediately gives "Out of stack space in line No line number in module MODULE3 at address 33D8:60E4" All the rest compile fine. I downloaded Demo #6, unpacked it to C:\Phylo\qb64 (such that data, internal, and samples were in that folder), then ran compile.bat and entered "samples\3dballs.bas". PhyloGenesis ------------------------ "For each programmer, there is an equal and opposite programmer who can't stand to read the first programmer's code." - Snook from IP address 71.102.249.174 |
RE: Out of stack space compiling XWING.BAS and 3DBALLS.BASby (no login)I "discovered" this yesterday too. Truth be told, the QB64 compiler has reached the limits of what is possible in QB7.1 (believe me I've tried ALL the tricks like multi-modular, compiler options and recoding some bits) and even though it runs in the interpreter fine I'm having major difficulties getting it to compile into a stable .exe. I'm looking at getting QB64 to self-compile VERY SOON to overcome these discrepancies because it's gotten to the point where I'm afraid to add anything new for fear of not being able to compile it at all! from IP address 58.110.128.68 |
_This_ is one for the tabloids! xDby OLPC (no login)But you can solve this eventually. ;-) Or maybe, you could compile QB64 in... FB!!! :-P :-D ;-) from IP address 4.246.6.44 |
First, rpgfan3233 is right, vortex.bas also fails. I know in QBasic, one usually gets a stack space error because a sub called itself too many times, but I don't get why that would be a problem in C++. Sure, C++ has its limit, but it should be thousands of times greater and not something any current QBasic program (unless it loops infinitely) would reach. I don't understand what the issue is of compiling. I'm pretty positive QB64 is not at the verge of being too large for gnucpp to compile it. What exactly is the limit being reached? How would QB64 compiling itself make any difference? Many thanks (for QB64), PhyloGenesis ------------------------ "For each programmer, there is an equal and opposite programmer who can't stand to read the first programmer's code." - Snook from IP address 71.102.249.174 |
The QB to C translator is written in QBASICby qbguy (no login)The QB64 "compiler" ran out of stack space. It is a limit of PDS, not one of the GNU C++ compiler. By self-compiling QB64, Galleon will avoid the "out of stack space" error. from IP address 75.0.234.25 |
------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
Same stack space issue.by Pete (Login The-Universe)R INKEY$ is faster, it only has a bit of lag now. It's a shame these projects are so complicated. I mean it still needs a lot of work to make the original goal and until I can try out some larger apps with it, I don't see me giving it any positive attention. I usually find that in these circumstances the best course of action I can take is to turn away for awhile and see what's up later. Maybe in another 6-mos or so. Hopefully, it will be worth the wait as I still feel that the concept of QB64 is quite valid. Pete from IP address 70.177.5.114 |
No worries Pete, thanks for the feedback about INKEY$ (see you in 6 months!)by (no login)from IP address 58.110.128.68 |
* from IP address 71.102.249.174 |
Circular Slide Rule QB64 Versionby qbguy (no login)'Instructions: http://www.network54.com/Forum/585676/message/1203688165/OK%2C+Here%27s+some+instructions DECLARE SUB DrawInner (delta!) DECLARE SUB DrawCursor (angle!, delta!) DECLARE SUB DrawOuter () SCREEN 12 DIM SHARED PI DIM SHARED dialsize DIM SHARED OldAngle, OldX, OldY, OldDelta PI=3.141592654 dialsize = 200 'This is the coolist part change the size of the clock! DIM SHARED H(10 TO 99, 4)' History DIM SHARED HH(6 TO 90, 4) DIM dD AS SINGLE, dC AS INTEGER: dD = .01: dC = 2 DrawInner .02: DrawCursor .02, .02: CLS LOCATE 1, 1: PRINT "Log: "; LOCATE 2, 1: PRINT "D: " LOCATE 3, 1: PRINT "C: "; LOCATE 4, 1: PRINT "Sin: "; LOCATE 5, 1: PRINT "Cos: "; DO LOCATE 1, 7: PRINT (angle / (2 * PI)) - INT(angle / (2 * PI)) LOCATE 2, 7: PRINT EXP(((angle / (2 * PI)) - INT(angle / (2 * PI))) * LOG(10)) LOCATE 3, 7: PRINT EXP((((angle - delta) / (2 * PI)) - INT((angle - delta) / (2 * PI))) * LOG(10)); ang = EXP((((angle - delta) / (2 * PI)) - INT((angle - delta) / (2 * PI)) - 1) * LOG(10)) ang2 = 2 * ATN(ang / (1 + SQR(1 - ang * ang))) * 180 / PI LOCATE 4, 7: PRINT ang2; ang3 = 90 - ang2 LOCATE 5, 7: PRINT ang3; DrawOuter DrawInner delta DrawCursor angle, delta WHILE INKEY$ <> "": WEND: DO: k$ = UCASE$(INKEY$): LOOP WHILE k$ = "" SELECT CASE k$ CASE CHR$(27): SYSTEM CASE "F", "S": GOSUB AdjustSpeed CASE CHR$(0) + CHR$(80): delta = delta + dD CASE CHR$(0) + CHR$(72): delta = delta - dD CASE CHR$(0) + CHR$(77): angle = angle + dD CASE CHR$(0) + CHR$(75): angle = angle - dD END SELECT LOOP AdjustSpeed: SELECT CASE dC CASE 1: IF k$ = "F" THEN dD = .01: dC = 2 CASE 2: IF k$ = "F" THEN dD = .1: dC = 3 ELSE dD = .001: dC = 1 CASE 3: IF k$ = "F" THEN dD = 1: dC = 4 ELSE dD = .01: dC = 2 CASE ELSE: IF k$ = "S" THEN dD = .1: dC = 3 END SELECT w$ = "----": MID$(w$, dC, 1) = "o" LOCATE 6, 1: PRINT w$ RETURN SUB DrawCursor (angle, delta) IF OldAngle = angle THEN LINE (320, 240)-(OldX, OldY), 4 GOTO 1 END IF OldAngle = angle cursorX = COS(angle) * dialsize * 1.18 cursorY = SIN(angle) * dialsize * 1.18 LINE (320, 240)-(OldX, OldY), 0 OldX = 320 + cursorX OldY = 240 + cursorY LINE (320, 240)-(OldX, OldY), 4 DrawOuter DrawInner delta LINE (320, 240)-(OldX, OldY), 4 1 END SUB SUB DrawInner (delta) innersize = dialsize * .8 sinesize = dialsize * .6 IF delta = OldDelta THEN FOR T = 10 TO 99 COLOR 7: LINE (H(T, 1), H(T, 2))-(H(T, 3), H(T, 4)) NEXT T FOR T = 6 TO 90 COLOR 7: LINE (HH(T, 1), HH(T, 2))-(HH(T, 3), HH(T, 4)) NEXT CIRCLE (320, 240), innersize, 7 CIRCLE (320, 240), sinesize, 7 GOTO 2 END IF OldDelta = delta FOR T = 10 TO 99 cool = LOG(T / 10) / LOG(10) * PI * 2 + delta coolx = COS(cool) * innersize cooly = SIN(cool) * innersize IF T MOD 10 = 0 THEN hatchsize = 1.15 ELSEIF T MOD 10 = 5 THEN hatchsize = 1.08 ELSE hatchsize = 1.05 END IF cool2y = SIN(cool) * (innersize / hatchsize) cool2x = COS(cool) * (innersize / hatchsize) COLOR 0: LINE (H(T, 1), H(T, 2))-(H(T, 3), H(T, 4)) H(T, 1) = coolx + 320: H(T, 2) = cooly + 240 H(T, 3) = cool2x + 320: H(T, 4) = cool2y + 240 COLOR 7: LINE (H(T, 1), H(T, 2))-(H(T, 3), H(T, 4)) NEXT T FOR T = 6 TO 90 sine = LOG(SIN(T * PI / 180)) / LOG(10) * PI * 2 + delta sinex = COS(sine) * sinesize siney = SIN(sine) * sinesize IF T MOD 10 = 0 THEN hatchsize = 1.15 ELSEIF T MOD 10 = 5 THEN hatchsize = 1.08 ELSE hatchsize = 1.05 END IF sine2x = COS(sine) * (sinesize / hatchsize) sine2y = SIN(sine) * (sinesize / hatchsize) COLOR 0: LINE (HH(T, 1), HH(T, 2))-(HH(T, 3), HH(T, 4)) HH(T, 1) = sinex + 320: HH(T, 2) = siney + 240 HH(T, 3) = sine2x + 320: HH(T, 4) = sine2y + 240 COLOR 7: LINE (HH(T, 1), HH(T, 2))-(HH(T, 3), HH(T, 4)) NEXT CIRCLE (320, 240), innersize, 7 CIRCLE (320, 240), sinesize, 7 2 END SUB SUB DrawOuter asdfsize = dialsize * 1.18 FOR T = 1 TO 100 asdf = (T / 100) * PI * 2 asdfx = COS(asdf) * asdfsize asdfy = SIN(asdf) * asdfsize IF T MOD 10 = 0 THEN hatchsize = 1.15 ELSEIF T MOD 10 = 5 THEN hatchsize = 1.08 ELSE hatchsize = 1.05 END IF asdf2y = SIN(asdf) * (asdfsize / hatchsize) asdf2x = COS(asdf) * (asdfsize / hatchsize) LINE (asdfx + 320, asdfy + 240)-(asdf2x + 320, asdf2y + 240) NEXT FOR T = 10 TO 99 dial = LOG(T / 10) / LOG(10) * PI * 2 dialx = COS(dial) * dialsize dialy = SIN(dial) * dialsize IF T MOD 10 = 0 THEN hatchsize = 1.15 ELSEIF T MOD 10 = 5 THEN hatchsize = 1.08 ELSE hatchsize = 1.05 END IF dial2y = SIN(dial) * (dialsize / hatchsize) dial2x = COS(dial) * (dialsize / hatchsize) LINE (dialx + 320, dialy + 240)-(dial2x + 320, dial2y + 240) NEXT T CIRCLE (320, 240), asdfsize, 7 CIRCLE (320, 240), dialsize, 7 END SUB from IP address 75.0.234.25 |
I must be a genius cause nothing I made worksby (Login burger2227)R I have yet to compile any of my programs with QB64 and the error messages just disappear too fast. Could the compiler at least pause to let me read them? No luck on the sound either, except in the endless "Message.bas" Demo. No "escaping" from that. I guess I gotta wait till it's done further. But I am not in a real hurry unless my XP crashes. Was INKEY$ fixed anyone? I could write some stuff to test it with. I already tried my Wordwrap text generator and no compile. It has no SUB calls. Will try to see what else it could be. Thanks for the effort Galleon! Ted from IP address 71.60.226.47 |
I just created a quick one in Notepad++: FOR i = 1 TO 4 <tab>PRINT i NEXT The tab threw it off. Changing the tab to a few spaces works, however: FOR i = 1 TO 4 <space><space><space><space>PRINT i NEXT i ------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
Do the examples in the "samples" folder compile Clippy?by (no login)It sounds like an OS specific problem to me atm, which is strange because I also use XP. If it's just a problem with programs you've found/written then I'm unsurprised many of them don't compile. QB64 still needs a lot of work. Check readme.txt carefully for restrictions, also, feel free to post some programs you've been having trouble with so I can work out why they don't. Thanks for the info, Galleon from IP address 58.110.128.68 |
The examples seem to work fine.by (Login burger2227)R I will have to see if I can find what is causing the problem. Do the messages sent by the compiler help? They disappear too fast, so I wait hopefully for an EXE file to appear. I doubt it is an XP problem. I just use some advanced stuff to do things. I will keep trying though and keep you posted. Is INKEY$ fixed for that slowness problem? Ted from IP address 71.60.226.47 |
------------------ Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles. from IP address 12.208.126.190 |
RE: The examples seem to work fine.by (no login)It sounds like you're trying to use features that aren't implemented yet. Sometimes the QB64 compiler will "catch" the error before the C++ compiler is called. However, if you are getting lots of error messages these are being generated by the C++ compiler and it means the QB64 compiler has missed the error (this happens a lot when trying to compile bad code). If you think your .BAS program should com |