QBasic Forum BASIC Discussion Board

[QB FAQ] [QB Archives, Links and Downloads] [Subforums and Chat Room] [Search]

Run QBasic Code on Modern Systems:  QB64   Post Code or Ask for Help:  Post Code   Homework Policy



working on a few new projects. in the meantime, why can't CHAIN do...

by mn (no login)

SKIP TO "CHAIN" ...i have tried to take a break from this place, which i must really be "enjoying" (that's a trickier concept than people give it credit for) because [the obvious.]

throughout a few attempts i've made a variety of tools to look over all my files, but always in basic. now i'm doing one in python. if i did it in basic, i'd have to expect the project i'm spending all this time on would have to change or workaround whatever basic fads are going on. i wish basic was a stable, fun platform to work on anymore. the last time it was, i was happy using it in dosbox.

i've also started another book. i've writen 90% of a book on one subject, but it's got a little bit to go, the only one i ever finished was the one on qbasic (spend many months on that, and a few enjoyable days on the fairly useless version i made for qb64. fairly useless because i did it for the project qb64 used to be... but hey, who cares about what it used to be?) and most of the others i've started are half done or less.


CHAIN:
why can't CHAIN be simple? i'm not talking about ditching compatibility (is it compatible with anything? it seems a little meaningless in a compiler, but i seem to recall galleon (if not the fb devs) doing some lovely work on a limited "do the best possible" implementation of it. no gnu/linux support, right?

by "simple" i mean "does one thing, does the expected thing, does the thing consistently regardless of platform."

by my own "laws," CHAIN should be as close to the original as possible. but i wouldn't use CHAIN unless it did the simplest thing... which it should be able to do on some platforms.

i can shell to another program, i can shell to another program and exit, or i can shell to a compiler to run uncompiled programs, run the output, and then exit.

i can do those cross platform if i want, and it would probably be more reliable than CHAIN.

and i'm happy to do so. CHAIN may implement some or all of these, in a very simple way, but i thought i read it's not cross platform (yet.)

if something that simple isn't cross platform, i can only imagine that a gl version is slowing it down. just a guess.


by the way, if you can't stop writing about something, write more. while i often waste this on the forum, i've been looking at alternatives and amusing myself with those. but i'm sure i'll post some or all of it here, too.

Posted on Nov 23, 2014, 2:09 AM

Respond to this message   

Return to Index


bah, i do remember a couple things

by mn (no login)

chain can pass some/all variables, right?

and (according to something i read) current screen mode (once upon a time?)

ok, so that sort of answers my question. passing variables... i'd be fascinated to know how that's done on ANY platform. but don't go to the trouble of explaining it unless it just sounds like the best time ever.

withdrawing question, but feel free to answer it however.

Posted on Nov 23, 2014, 2:14 AM

Respond to this message   

Return to Index


Luke sure has some crazy ASCII ideas...

by Pete (Login The-Universe)
Admin

Like one I was reading in his response to menn, about just printing a duplicate of everything printed to screen 12 on an inactive SCREEN 0 page. That would be a neat trick, since changing screens is problematic. It would erase everything on SCREEN 12 each time you pulled that screen switch. You could use those memblocks to restore it, but it doesn't sound as easy as what I would do for this BUG in QB64...

DIM SHARED matrix$(25)
COMMON SHARED fcoloxr, bcoloxr
FOR i = 1 TO 25
matrix$(i) = STRING$(512, 0)
NEXT
pcoloxr = 0: fcoloxr = 7: bcoloxr = 0
CLS
LOCATE 1, 17
txt$ = "Pete"
p = pri(txt$)
LOCATE 6, 56
fcoloxr = 14
txt$ = "Re-Pete"
p = pri(txt$)
LOCATE 25, 30
fcoloxr = 15: bcoloxr = 4
txt$ = "3-Pete!"
p = pri(txt$)
SLEEP
COLOR fcoloxr, pcoloxr
CLS
SLEEP 1
FOR i = 1 TO 25
LOCATE i, 1
FOR j = 1 TO 80
k = ASC(MID$(matrix$(i), j + 256, 1))
IF k <> 0 THEN
COLOR INT(k / 16), k MOD 16
ELSE
COLOR 7, 0
END IF
PRINT MID$(matrix$(i), j, 1);
NEXT j
IF i = 25 THEN EXIT FOR
LOCATE CSRLIN + 1, 1
NEXT i
SLEEP
COLOR fcoloxr, pcoloxr
CLS
END

FUNCTION pri (txt$)
MID$(matrix$(CSRLIN), POS(1), LEN(txt$)) = txt$
MID$(matrix$(CSRLIN), POS(1) + 256, LEN(txt$)) = STRING$(LEN(txt$), CHR$(fcoloxr * 16 + bcoloxr))
COLOR fcoloxr, bcoloxr
PRINT txt$;
END FUNCTION

--------------------------------------
With the above routine, you don't need the SCREEN() function to read a character, or the color. The matrix$() array holds it for you.

I only bother, because I will need what I just created for my Android routines, as Android-BASIC reads only characters from the screen, not the color attributes. So it solves the Android color problem, and QB64's lack of character,,, in SCREEN 12 with any text character background color other than black.

Now Luke, if you have a way to do what I did by switching screens, it may be a QB64 feature over what QBasic could do, and you are welcome to post it as a comparison to my example.

Pete

Posted on Nov 23, 2014, 12:28 AM

Respond to this message   

Return to Index


Re: Luke sure has some crazy ASCII ideas...

by (no login)

It's not hard to do. Try this as a quick test code:

DIM SHARED ns AS LONG
ns = _NEWIMAGE(80, 40, 0)
SCREEN 12

LINE (100, 100)-(200, 200), 4, BF 'To show we're in a graphic mode
DualColor 12, 15 'To change the color
DualPrint 10, 15, "Pete" 'To print at our location
FOR i = 15 TO 18
PRINT CHR$(ReturnScreenChar(10, i))
NEXT


SUB DualPrint (x, y, text$)
d = _DEST
_DEST 0
LOCATE x, y: PRINT text$
_DEST ns
LOCATE x, y
PRINT text$
_DEST d
END SUB

SUB DualColor (fg, bg)
d = _DEST
_DEST 0
COLOR fg, bg
_DEST ns
COLOR fg, bg
_DEST d
END SUB

FUNCTION ReturnScreenChar (x, y)
s = _SOURCE
_SOURCE ns
ReturnScreenChar = SCREEN(x, y)
_SOURCE 0
END FUNCTION

Posted on Nov 23, 2014, 1:21 AM

Respond to this message   

Return to Index


and if it's not hard to do, why not just do it already?

by (no login)

we can toss the ball back and forth and say "you do it! no YOU do it!" "why should i do it?" "what are you talking about? i did do it!" and this is the pattern for an ego-driven project that wants to blame users for wanting things to work, and not give them any credit when an honest critique turns out to be right/useful/made use of.

it's a common problem which has very little to do with tone.

-> it behooves a project to maintain a more, not less civil tone than its critics, although no one can make them.

-> "circling the wagons" looks less like pioneering these days, and more like cult mentality

-> if i use a poor tone, and someone else uses a poor tone in response, aren't we "even?" why is it that integrity becomes irrelevant and no one has to admit i was right?

-> i don't care much if people don't want to admit i was right. what irks me far more is that the original critique/report/feedback i'm siding with, which was reasonable, technical and polite, is dismissed just as much as i am dismissed (which really limits the liklihood that it was really about my tone in the first place, but about some developer's ego.)

and yet, if this were just about the tone of my critique, i'd be much happier being taken to task for that, instead of the farcical and passionate insistence that i never knew what i was talking about in the first place.

if that's true, why did anything get fixed? if i was wrong, there wasn't anything TO fix.

but hey, what- ever. people think their smart, and they're right. but i care more about whether they're honest, especially since they're going to smear me.

if all of steve's mistakes were honest, i would forgive them all when he followed through.

that's not how it goes with groupthink. critics are enemies and dispatched accordingly.

acgh! ooh, ya got me, pardner...

but i'm used to this phenomenon. it existed in freebasic, it exists in systemd and ubuntu, microsoft did it way before these open source guys, and it's basically "NIH" but for bugs instead of features.

it's more of the same old amateur hour, but i like amatuers when they don't get too full of themselves. i still can't understand how galleon fits into that, unless it's apathy and some loyalty to fellow devs.

as for mixing up wagon circlers with leaders, i'm sorry about that. it's just a chicken and egg thing. so if i'm suddenly talking about someone else and don't mention it, that's why.

as i was saying, if it's so easy for a user to fix a non-working feature, why not just freaking fix it and stop pouring heart and soul into lame excuses? i really do understand the volunteer thing. i also understand that good projects have design.

when you offer your user extraneous specialized nonsense they don't need, but subtract the basics because they can "fix it themselves," you've put the back of the design in the front.

just fix the useful features that are easy to fix (and in fact, already implemented in a similar mode) and next time you're going to "do the user's work for them" with some stupid, pointless function, "do the dev's work for them" and throw that "so easy a user could code it" functionality that FIXES THE BROKEN COMMAND.

it's simply astonishing that any developer (amateur or otherwise) cannot be appealed to with such simple, solid logic. but that's the power of ego to limit the senses.

:P :P :P :P

hey, at least you're in good company: gnome, red hat, microsoft, even kde and debian these days. :(

i'm in good company too, but when i come HERE the only fellow voice of reason on this matter is pete. (thebob doesn't say anything, but if he did i imagine it would be sensible.)

oh well, never send a developer to do a proctologist's job.

Posted on Nov 23, 2014, 1:43 AM

Respond to this message   

Return to Index


*their/they're. at least i realize it's a typo, i'm not pretending it's "by design."

by (no login)

Posted on Nov 23, 2014, 1:46 AM

Respond to this message   

Return to Index


Re: and if it's not hard to do, why not just do it already?

by (no login)

"and if it's not hard to do, why not just do it already?"

WHY?

As you can see with the demo, if someone needs such a feature it's simple enough to implement for themselves.

The thing is, this is something that no one has needed for the last 10 years of QB64 history, and no one has ever used. It's unnecessary for 99.99987% of all users.

And yet, because one user seems to want this capability; and they don't want to make use of an alternative system that's been demonstrated to them; they expect things to change so that those other 99.99987% of the users of the project are required to create programs which use more memory and have higher end-use requirements.

Basically you can go Pete's route, which requires an array to hold the information you send to the screen; or you can use a separate screen to store that information; but either way you're going to have a higher memory requirement than just using a basic SCREEN 12 screen.

There's also a simple 3rd method of doing what you're wanting: use the hardware images for the graphical portion of your program and only work in SCREEN 0.

The truth is simple:

1) This is a fringe case BUG, if you want to call it that, that affects almost nobody and no code. It took years and years before someone finally noticed it didn't work and reported it.

2) An user can work around this easily enough if they need to, as they can code a solution which works in the limited scope of their own specific program. (I'm ONLY going to print at LOCATION coordinates, with the default _FONT 16, and never going to use the transparent text options with _PRINTMODE -- the solution to this specific instance to the problem is as simple as the examples posted earlier in this thread.)

3) To correct the issue for QB64 would require other more serious issues be ignored which affect the user base as a whole. Also, any sort of real correction which would work with variable fonts, font sizes, background modes, and transparent text would require MASSIVE amounts of coding to be done. To fix this so that it'd work with all the options QB64 has would take a lot of time and effort to do properly, and would increase the size and memory requires of QB64 and EVERY program written with QB64; whether they use SCREEN or not.

So, keeping those simple truths in mind, I don't think anyone is going to bother to work on fixing this bug anytime soon.

And another truth:

The project is open source. If you're so passionate about this one bug, feel free to take the time to code the solution yourself. I'm certain the QB64 developers would be grateful for your assassistance.

But of course, that means you'd be doing something constructive and you don't want to do that. All you're interested in is bitching and moaning about how anything being developed by anyone, anywhere, who isn't YOU, is doing it wrong...

YAWN!

Same ole, same ole. We've heard it all before. The devs won't fix this. The program is broke. You'll never use it now...

But wait!!

Didn't you never use it before? And haven't you stopped using it a long time ago?

All you want is to bitch and whine and moan and cry and try to insult people who aren't even here anymore.

YAWN!!

In the words of the great Clippy: WGAS!! and GFYS!!

Posted on Nov 23, 2014, 2:42 AM

Respond to this message   

Return to Index


well, WGAS and GFYS are why i stopped using it in the first place

by mn (no login)

so much cooler than "I GAS" or "WeGAS" or my favorite:

"we implemented a fix for screen 0 but instead of using it to fix a bug in screen 12, we'll just tell people to GF themselves and pretend they're the ONLY PERSON THAT CARED ABOUT IT."

WRONG!

i have yet to bring up one single complaint about qb64 that wasn't brought up by someone else still using it or interested. so remember, you're (however inadvertantly) telling them to "GF" themselves too.

too bad NGAS.. or is it NGAS64? GF**Y**S luke. you're a worthless POS and when you get a clue, you can have all the credit to yourself just like every other idiot that taints your compiler.

way to go, galleon. you made something that is better than freebasic in every way

it even has bigger losers "promoting" it.

so far from what it promised. so redundant, i might as well use freebasic again. (and however rarely, indeed i do.)

enjoy your art project.

Posted on Nov 23, 2014, 2:58 AM

Respond to this message   

Return to Index


Re: well, WGAS and GFYS are why i stopped using it in the first place

by Not Luke! (no login)

"we implemented a fix for screen 0 but instead of using it to fix a bug in screen 12, we'll just tell people to GF themselves and pretend they're the ONLY PERSON THAT CARED ABOUT IT."


First, let's clarify some things here:

1) QB45 ONLY allows a black backgound and 16 colors in SCREEN 12.

2) QB64's SCREEN command works in SCREEN 12 with a black background, thus it's 100% QB45 compatible.

3) QB64 *EXPANDS* upon the limitations of QB45 and allows users to set a background color that wasn't possible in the past.

4) This expanded ability has NOT been expanded into use with the SCREEN function.

So, to sum this up:

It's NOT a bug. It works perfectly fine if you use the same black background QBASIC and QB45 used in the past. It's only by using those NEW, expanded features unique to QB64 that one can run into this issue.

You're not wanting a bug fixed.

You're wanting to expand the features of QB64. Install a "shiny new feature" that didn't exist in the past...

And yet you don't like anything shiny or new!!

MAKE UP YOUR MIND!!

What you're looking for isn't a bug fix; it's a feature request. And with the way you act when you ask for one, I can completely understand why your request just gets sent straight to the crapper. It's basically the same place you belong.

Posted on Nov 23, 2014, 3:12 AM

Respond to this message   

Return to Index


how anyone takes you seriously is a freaking miracle

by mn (no login)

you're like tommy from the who song. except they don't say "that deaf dumb and f***ing impossibly stupid old farmer."

forget about how i talk to you, just see how long it takes you to learn from any of your users. then you can really go "flush" yourself, now that you've wiped with galleon's compiler. have a nice one.

Posted on Nov 23, 2014, 3:15 AM

Respond to this message   

Return to Index


A reminder

by Luke (Login flukiluke)
R

Rob wrote the SCREEN() function, and nooone's touched it since. I suggest you go yell at him.

Also, implementing your feature set would break QB compatibility, and we can't have that now, can we?

Posted on Nov 23, 2014, 3:55 AM

Respond to this message   

Return to Index


I'm honoured...

by Luke (Login flukiluke)
R

...that you should think that it's me. Unfortunately, I've not written any essays recently. However, since I've got this soapbox, here's a program for you to ponder over:

SCREEN 12
PRINT "Hello"
LINE (0, 10)-(50,50), 10, BF
PRINT SCREEN(1, 1)

As for fixing the bug in QB64, the fix is in fact quite simple - change the currently-returned 219 to 32. QB compatibility: check.

Posted on Nov 23, 2014, 2:41 AM

Respond to this message   

Return to Index


guess i owe you an apology of sorts

by mn (no login)

so here's a sort of apology.

i was sure that was you, and unfortunately, it led me to believe that the a-holish rant that followed up was you also.

i don't think we're pals or anything, but you normally treat people with at least a little more thinking things through than the other qb64r's. i was surprised when i got "your" most recent reply.

then i saw this one.

that must have been steve. so me telling you to GFY was a mistake. i intended to address whoever wrote it.

doesn't it make sense to fold such bugfixes into the compiler, rather than expect the user to constantly code around them?

of course i'm not talking about steve64, just as a general rule of sane design.

Posted on Nov 23, 2014, 3:03 AM

Respond to this message   

Return to Index


QB64 and "Shiny object syndrome"

by (no login)

Shiny object syndrome isn't "new features," it isn't "Cool new features," it's more like feature hysteria. Features are like cells, in that new ones are generally expected as part of life, but if they start to reproduce abnoramally, they can lead to death. Getting so into features that nothing else seems to matter is the first sign of death of an Open Source project, and examples abound.

Consider this 2010 article: "Microsoft: Stop the shiny object syndrome":

This is how Microsoft markets its products daily ranging from websites, applications through to random programs that are meant to simplify your world into a few bullet points or less.

The reality is this, it gets to a point where you simply just roll your eyes at every new announcement and essentially approach it with an element of contempt or cynicism. To be fair, you’re suffering from the old “fool me once, shame on you; fool me twice shame on me” effect.

http://www.riagenic.com/archives/358

With Microsoft, it's as much about features that are vaporware, but Microsoft can drop products anytime if they're half-implemented. Like Microsoft, QB64 half-implements features and moves on, dismissing any shortcomings as a reasonable aspect of the intended design.

In this sense, QB64 isn't vaporware because parts of it work. It is vaporware because the features often don't work completely, and instead of fixing them, they are ignored or "fixed" in the same half-assed way they were implemented in the first place.

Quality control is broken, developer attitudes suck, and excuses are a bigger part of the product than bugfixes or even features.

Why bother developing if all you get is flack? Also, why bother being part of "quality control" (outside the world of open source, people get paid for doing QC; any donations going to reporters of bugfixes?) if you only get dismissed for half-thought-out reasons?

QB64 for example, has a broken POINT statement. Since that worked in QB, it makes more sense to replace it with a half-implemented version. QB64's screen 0 has the same limitation as Screen 12: it's really graphical, so you have to track the color and character information. Problem solved!

But instead of adding that already-implemented working to Screen 12 to unbreak a half-implemented feature, someone makes a thoughtless excuse saying screen 12 can't because it would need to track... well, exactly what screen 0 tracks.

Thoughtless. Sucky. Attitudes.

What's next for QB64? Lots more shiny. Lots less thoughtful design. Lots more features, but fewer and fewer and fewer implemented in anything but a half-assed way.

Quality Below 64? Once 64+64, now more like QB-64. Either way, it gets an F for forgetting its design goals. Or perhaps a half-assed fad was the idea all along. With so much history being rewritten to justify laziness, who will ever know what the point of QB64 was?

Only those who remember the earlier versions.

The problem is that the new excuses aren't just lazy and unnecessary, they're also dishonest. They insult the intelligence of anyone who actually knows what QB is supposed to do, and the intelligence of anyone who remembers QB64's goals. They ask you to forget all about that, which is a disappointment to any but those who weren't paying attention in the first place; and worse, they ask you to pretend you don't know what you were told originally.

So lie against your own knowledge and disappointment, and look forward to more shiny. With the current dev attitudes, all the new shiny will be broken soon, but that's ok! For every old not-so-shiny they break, you get two BRAND NEW shinies that won't work either.

In other words, QB64 should be good enough for anyone. All you have to do is pretend it works like it's supposed to: Steve will show us how that's done!

Please don't accuse anyone of being cheap because QB64 is "free," so is FreeBASIC. There are people who would pay Steve just to *stop* development. Then he could get paid for not farming *and* not coding! (Hey, how cushy is that?)

Posted on Nov 22, 2014, 4:40 PM

Respond to this message   

Return to Index


* What's wrong with the POINT function?

by Luke (Login flukiluke)
R

Posted on Nov 22, 2014, 6:27 PM

Respond to this message   

Return to Index


Typo, SCREEN function. Or statement. Whichever returns character information. *

by (no login)

Posted on Nov 22, 2014, 6:56 PM

Respond to this message   

Return to Index


Re: QB64 and "Shiny object syndrome"

by (no login)

"QB64 for example, has a broken POINT statement. Since that worked in QB, it makes more sense to replace it with a half-implemented version. QB64's screen 0 has the same limitation as Screen 12: it's really graphical, so you have to track the color and character information. Problem solved!"

And this shows why no one can bother to take you seriously. SCREEN 0 is fundamentally different than SCREEN 12. Just get a _MEMIMAGE of them sometime and compare. SCREEN 0 stores each character on the screen in 2 bytes -- ASCII code and color code. SCREEN 12 stores information in a single byte; but for each PIXEL not each CHARACTER.

Here's 2 very simple solutions to your problem:

1) Write information to 2 screens. Make SCREEN 12 the visible screen, print to it, but also print to a hidden SCREEN 0 screen. Get your character information from there.

2) Write your own custom font reading routine. Make an array, draw the font you have loaded in memory, and scan it in using POINT. Then scan each LOCATION at X/Y position for _FONTWIDTH x _FONTHEIGHT dimensions and find the closest match and return those values.

*YOU* don't seem to like the way the developers are going with QB64, just because they aren't rushing to do things for you. One works in an efficient string compare routine and you deride it as not being needed. A TRUE programmer does that on their own.... And yet, a feature that is such low priority that that it's only taken what? 10 years? for someone to notice it's not 100% compatible suddenly needs to jump to the top of the development list!

Don't be absurb!

Show us how a *TRUE* programmer works around a limitation. QB64 has never full compatibility with QB45. No one expects every PEEK or POKE address to be emulated. DEFN has never been added. CALL ABSOLUTE doesn't work. CHAIN isn't 100% compatible. It can't load or save BAS tokenized files. It doesn't work with .MAK modules properly...

The list goes on and on for what it can't do.

And yet, these are all "fringe" cases of the core of the language, and each feature is rarely used. Every so often someone pops up on the forums with a question about "Why doesn't this work with DEFN?" Or "What's wrong with this PEEK/POKE?" Or "How do I get my MAK file to load?"

And all these folks are answered with: It's not implemented...

And instead of complaining the language is broken vapor ware, they simply find a way to work around the limitations. Seems like they might be *TRUE* programmers and you should take a page from their book.

Or else you can simply join the development team and add in the fringe features you think it's missing yourself. The language *IS* open source after all.

Either way seems like it'd be more productive for you than just whining over whatever the developers are currently working on. (What "new shiny" are they working on now?) Steve has went on break until the New Year. Galleon is as quiet as ever. I really don't know of ANY development going on over at the project currently.

And just out of curiosity, how much are you going to pay Steve not to code? Seems like you owe him some back pay as he hasn't coded or pushed a change into the repo for quite a while now.

Funny though: Steve has been the one fixing QB compatibility with things here lately, and yet you don't want him coding in the project. He completely redid the string compare routines so they'd behave more as BASIC expects and less like C, but yet you don't want him to change anything...

"Hey, somebody should fix this, but that guy fixes things? We don't want that guy to do anything! We'll pay him not to!" Anyone else see the irony in this??

Posted on Nov 22, 2014, 9:18 PM

Respond to this message   

Return to Index


Backpedaling is great, being honest in the first place is better

by (no login)

"Funny though: Steve has been the one fixing QB compatibility with things here lately"

"He completely redid the string compare routines so they'd behave more as BASIC"

The posturing is where the misunderstanding comes in, if there is a misunderstanding.

What posturing? Saying "I don't think this is really a bug" to every single bug, as if it's unreasonable to point out compatibility in the first place.

Talking about how it's all about the future, not about old things (like all the programs QB64 was created specifically to support.) This is a change of tone for the project, and a change of direction. But a change back to compatibility first (or even in a reasonable period of time) is welcome.

Pretending that anyone who cares about compatibility has some kind of problem. If that's the case, it must be spreading, since these things are allegedly being fixed. Great to see that old and unnecessary arguments are being won, but they didn't have to be arguments in the first place. Only Steve's arrogance makes everything like that uphill.

Galleon has changed with the project, acting bitter, dismissive, and unlike himself.

It's all about people being unable to admit mistakes, and putting them on the user. Sure, the user doesn't have to burden themselves with the project, and that appears to be the common response: apathy. But to make it about anyone's attitude other than Steve's is just one more instance (there's the OOP in QB64, a Sarcasm Generator named .STEVE) of putting the dev's shortcomings on the user.

Shall we treat bugs like bugs, and bug reports (with accurate details collected over years of experience) as valable? Or shall we respond with apathy and derision and sarcasm, attacks on the community, and nonsense about the "future" direction (which doesn't exist.) It's exactly that attitude out of FreeBASIC that required QB64 to be created in the first place, but half a decade later, they've finally fixed a lot of things without any acknowledgement that anyone outside the herd mentality had a point.

That kind of dishonesty is the one bug that won't ever get fixed. But deny that there are any now, and fix them later, and sidestep the fact that the swath of the community that wanted compatibility (even more of it) probably wanted it because it made the language better, not because they're old curmudgeons stubbornly holding onto the past.

Half a decade later, the past may find its way to QB64 the way it eventually found its way to FreeBASIC. But by then, someone will have created a third version that keeps SDL, the QB64 project will be all but forgotten, and DarthWho will be talking about the things QB64 got wrong. It will be a decade before DarthWho has moved on, and left it in the hands of some other person who makes every incompatibility report uphill, before taking all the credit for fixing it when he couldn't even admit it was a bug in the first place.

At least if the pattern continues like this, that's what will happen. No idea why Steve can't just admit that "critics" (people who complain when goals are abandoned and credit isn't shared with people that helped make him useful*) are as important to the project as the decisions that really need to be criticised.

* Not me, rather the people who reported the incompatibilities in the first place. Although it would save him an awful lot of time if he bothered listening to anyone on this side, rather than trying to rediscover compatibility all by himself, after it was explained over here.

The best part is, Steve gets to split the community in two, and give the non-sycophants all the blame for it. Exactly what happened with FreeBASIC. But you keep lapping it up. To each his own, after all. Bon Appetit.

Posted on Nov 22, 2014, 9:47 PM

Respond to this message   

Return to Index


How the SCREEN function really works (in QBasic)

by (no login)

From the Peanut Gallery: "To be honest, I'm surprised this just doesn't toss an error code for graphical modes."

Once upon a time, QB64 was about compatibility, so here's what real QB does (fire up your DOS machine and see for yourself.)

Screen returns codes for color and character. The are separated into high and low nibbles. QB help may include code for getting them apart. (If this is not character information from color, it's FG vs. BG.)

In Screens 12 and 13, SCREEN works reliably, but: not if you pset over a character in a way that changes the visual pattern. Print an "O" in screen 12 and SCREEN will still tell you it's an "O". PSET into the middle of that "O," and SCREEN won't work properly on that character. CIRCLE in a way that crosses the "O", and SCREEN won't work on that character.

Don't be surprised that QB doesn't return an error code! Unlike recent versions of QB64, QBasic was extremely well (carefully, thoughtfully, thoroughly) designed. But however they designed it, it still had a limitation if you drew over a character.

Posted on Nov 22, 2014, 1:05 PM

Respond to this message   

Return to Index


Re: How the SCREEN function really works (in QBasic)

by Peanut Gallery (no login)

The reason it doesn't work in QB64 is from the advanced options QB64 offers.

Does QB45 allow _PRINTMODE _KEEPBACKGROUND? _PRINTMODE _ONLYBACKGOUND? You seem to realize that something PSET in the center of an "O" will skew the character recognition, but you don't seem to accept the way things would interact with these new options.

How about with a non-fixed width font? Or on a screen with different sized fonts? Or different style fonts? None of which was available in QB45, and thus not something the command would ever need to check for.

In QB64 we have multiple fonts built in. _FONT 7, 8, 15, 16. In a graphic mode you can use any, or all, of those at any time. When you use the SCREEN command, which of those fonts does it compare against?

By adding clear foregrounds, clear backgrounds, different font styles, and different font sizes, SCREEN has honestly became a function which honestly should only be used in SCREEN 0. In QB45, your character was a recognizable character unless something printed over it (like the PSET or CIRCLE you describe). In QB64, you can't even guarantee that much.

For instance try something like:

SCREEN 12
FOR X = 1 TO 100
FOR Y = 1 TO 100
PSET (x,y), RND * 40
NEXT
NEXT
_PRINTMODE _ONLYBACKGROUND
LOCATE 2, 2
PRINT "P"
PRINT SCREEN(2, 2)


Now, do you really think your randomly pixelated "P" is going to be reported back to you properly, if a simple PSET inside it will give false results?

Posted on Nov 22, 2014, 2:05 PM

Respond to this message   

Return to Index


Features > Compatibility = ...

by (no login)

Fad language.

Thing is, when you see something you don't recognize, which lots of people do (because they wrote programs that use those features,) you say: "Doesn't seem like a bug to me."

When bug reporting is useless, a project can't be saved by features. When features > compatibility, bug reporting is useless.

The rest is just technobabble. Cold hard facts vs. *Your Opinion.* On the practical side, perhaps write a guide when there's time on what kind of bugs you would actually consider being bugs, since incompatibility isn't a problem anymore, because [ whatever bogus nonsense you said in http://www.network54.com/Forum/648955/post?messageid=1416693954 ]. Enjoy Steve64.

Posted on Nov 22, 2014, 3:47 PM

Respond to this message   

Return to Index


Screen 0 is more about text than color

by Not Bill Gates (no login)

SCREEN 0 is not synonymous with "can do background colors." You can do screen 0 on a monochrome monitor: it's the default screen mode. There were also other screen modes for monochrome monitors, but those allowed graphics. It may be possible, or it may be impossible to do background colors on a monochrome monitor. Technically they had a range of two colors, but some had a "high-intensity" level.

The distinguishing feature of screen 0 is that it can't do graphics, except using ASCII art or characters as "pixels." While someone might feel clever pointing out that computers and software aren't so limited anymore, they're wrong. There are still modes and environments where graphics cannot be added. Those are the modes screen 0 works in. That sometimes screen 0 is emulated (or imitated) in an SDL or GL window is moot.

Talking about "Mixing screen 0 with graphics" to mean "graphics and background colors" is not only confusing because it's impossible on real "screen 0 hardware," but because it's not the only mode that allows background colors. Screen 9 allows graphics at near-screen-12 resolution, and at least one more background color than screen 12 allows, without using the PALETTE command.

Graphics are impossible in real screen 0, which still exists, and it is easier to simulate screen 0's background colors in screen 12 in real QBasic, in real DOS (using the POINT command and PSET) than it is to do graphics on a simulated screen 0 (which can't be done in DOS or real QBasic at all.) The only reason screen 12 can't address more than one background color is memory limitations of VGA. If you find a way around that, it probably isn't "screen 12" anymore, because "screen 12" isn't a software convention or an arbitrary name or number for a list of capabilities: like screen 0, screen 12 is a hardware specification that QB64 cannot ever use in an SDL window, only simulate. Screen 0 isn't a relic of DOS, it isn't a relic at all, your computer can still do it. But when it does do it, there won't be any graphics. If there are, that's "pretend" screen 0. Might as well call it "screen 14."

Posted on Nov 22, 2014, 10:25 AM

Respond to this message   

Return to Index


A bug in QB64 with SCREEN 12?

by Pete (Login The-Universe)
Admin

It might be only the SDL version, so let me know if it works because you are running GL, but...

SCREEN 12
COLOR 15, 0
PRINT "Pete"
x$ = CHR$(SCREEN(1, 1))
COLOR 7, 0
PRINT x$, ASC(x$)
END

OK, that works, however if we change the background color, which 64 supports in graphics, to anything else but zero as in...

SCREEN 12
COLOR 15, 1
PRINT "Pete"
x$ = CHR$(SCREEN(1, 1))
COLOR 7, 0
PRINT x$, ASC(x$)
END

it returns character 219, a block like 255, instead of character 80, the "P" in "Pete" so, a bug, and if so, was it fixed in GL?

- Pete

Posted on Nov 21, 2014, 10:47 AM

Respond to this message   

Return to Index


I have an older GL version, but it appears to be a bug.

by Clippy (Login burger2227)
R

SCREEN 12
COLOR 15, 1
PRINT "Pete"
x$ = CHR$(SCREEN(1, 1, 1))
COLOR 7, 0
PRINT x$, ASC(x$)
END

Returns the CHR$(1) smiley so the color option works

Posted on Nov 21, 2014, 12:07 PM

Respond to this message   

Return to Index


It works in FreeBASIC

by aoeu (no login)

More testing on the standard library might be an advantage of FreeBASIC. On the other hand, historically FreeBASIC has focused on pushing the fb dialect and ignored being BASIC-like, meaning less or no development on increasing compatibility "-lang qb" (or fblite)

Also FreeBASIC graphics programs run on the Linux framebuffer, without X11!

Posted on Nov 21, 2014, 3:41 PM

Respond to this message   

Return to Index


Almost no one here cares about the Linux framebuffer

by (no login)

Too bad, since it really is close to the experience of "BASIC" in "DOS" without Windows. Tough crowd. They say Linux isn't good enough software, then they use something that deliberately spies on them, constantly checks up on whether their hardware setup changes too much (and refueses to run,) can't get security right without piles of Band-Aids on top, and so on... But that's how "good enough" is measured.

Then again, the fb dialect is FreeBASIC's measure of "good enough," so everyone's in good company.

Posted on Nov 21, 2014, 7:48 PM

Respond to this message   

Return to Index


It must be the background color

by Clippy (Login burger2227)
R


SCREEN 12
row = 10: column = 10

COLOR 9: LOCATE row, column: PRINT "Hello"
code% = SCREEN(row, column, 0) ' character code return parameter 0
attrib% = SCREEN(row, column, 1) ' character color return parameter 1
COLOR 14: LOCATE 15, 10: PRINT "ASCII:"; code%, "COLOR:"; attrib%
END

Try using OUT to change the background color instead of COLOR with BG.

Posted on Nov 21, 2014, 6:59 PM

Respond to this message   

Return to Index


Exactly. It is a Henry Ford issue...

by Pete (Login The-Universe)
Admin

It will work with any background color, as long as it's black!

Change your color 9 to color 9, 1 and watch chr$(219) appear. make it color 9, 0 and it works as it should.

Try your OUT thing and see it that works.

Pete

Posted on Nov 21, 2014, 8:14 PM

Respond to this message   

Return to Index


Probably won't work on an Android or an Edsel

by Clippy (Login burger2227)
R

SCREEN 12
row = 10: column = 10
OUT &H3C8, 0: OUT &H3C9, 0: OUT &H3C9, 0: OUT &H3C9, 30 'blue background

COLOR 9: LOCATE row, column: PRINT "Hello"
code% = SCREEN(row, column, 0) ' character code return parameter 0
attrib% = SCREEN(row, column, 1) ' character color return parameter 1
COLOR 14: LOCATE 15, 10: PRINT "ASCII:"; code%, "COLOR:"; attrib%
END

Posted on Nov 21, 2014, 8:28 PM

Respond to this message   

Return to Index


That appears to be the work-around.

by Pete (Login The-Universe)
Admin

QB's very own RGB system.

Hopefully Rob will add character recognition for all the standard background colors.

Thanks,

Pete

Posted on Nov 21, 2014, 10:49 PM

Respond to this message   

Return to Index


Ah, but OUT only works to color the screen.

by Pete (Login The-Universe)
Admin

Setting the background color of the text still errors.

Pete

Posted on Nov 22, 2014, 10:00 AM

Respond to this message   

Return to Index


OUT can change the RGB intensities of any attribute to any color

by Clippy (Login burger2227)
R

Just so happens that the default background color is black. I'm used to not using COLOR for backgrounds in graphic screens.

I gather Rob never noticed that it affected the SCREEN function. It took how many years for us to find it!

Posted on Nov 22, 2014, 10:10 AM

Respond to this message   

Return to Index


Huh? It only took me a week to find it...

by Pete (Login The-Universe)
Admin

At least that is about the time I have been working modestly with graphics.

Anyway, so how would OUT be used as the background o a text character?

COLOR 15, 0 and change the 0 = black to blue?

Pete

Posted on Nov 22, 2014, 5:32 PM

Respond to this message   

Return to Index


Beginning work on graphics / text hybrid

by Pete (Login The-Universe)
Admin

I'll post the code in the code other forum, but or discussion purposes, it is neat to have Android-BASIC's ability to mix SCREEN 0 with graphics. I don;t know if the newer releases of QB64 will have that capability or not, but it allowed me a way around the lack off a background color for text in Android-BASIC.

Pete

Posted on Nov 19, 2014, 12:33 AM

Respond to this message   

Return to Index


The forum index last post is not working correctly.

by Kewbie (Login Kewbie)
R

The little pinned note icon is SUPPOSED to take you to the beginning of the thread that the last post link next to it is in. Instead, it just takes you to the same link as the last post link.

Pete, is this something you can fix, or will it have to be addressed by the Network54 staff? In either case, it'll probably never be fixed. :-D

Kew

Posted on Nov 17, 2014, 9:51 AM

Respond to this message   

Return to Index


Re: The forum index last post is not working correctly.

by Pete (Premier Login iorr5t)
Forum Owner

N54 is messing with database, getting ready or the release o their version "3". It is supposed to include sticky notes. Public testing may have messed up the note icon feature. So far, no mention of it on their public forum. I will give it a week or two, as these issues often get corrected internally.

Pete

Posted on Nov 17, 2014, 10:48 AM

Respond to this message   

Return to Index


* Thanks, Pete.

by Kewbie (Login Kewbie)
R

Posted on Nov 17, 2014, 9:12 PM

Respond to this message   

Return to Index


* And like magic, it's working correctly again.

by Pete (Login The-Universe)
Admin

Posted on Nov 18, 2014, 10:33 PM

Respond to this message   

Return to Index


Rob you ignorant GLUT!

by Weekend Update Team (Login The-Universe)
Admin

I can just hear another has-been, Chevy Chase, saying that from the old SNL series. Yep, there was only one SNL, but for us QB fans, there are two SDLs, and SDL2 would have been the right ticket to ride, but Rob don't care.

It's fun getting things to slowly run on mobile, but honestly, just QBasic statements on mobile, without much, if any, of the QB64 underscore stuff, would have rocked. Instead that project got mired down in a bed of dead petunias, oh well.

I would still love to see a finished slightly updated QBasic compatible version of that project, instead of this silly never to be finished art project it turned into. If I wanted an art project, I'd downloaded Paint.net.

Maybe in some quantum universe, an SDL2 version of QB64 will get pushed up Rob's Creek. I hope so, because I honestly believe that is the best shot at an eventual QB64 mobile option.

Currently I'm finishing up a couple of non-programming big projects, but I also have a new project on the horizon. With any luck, I should be getting the mobile BASIC sub-forum open pretty soon. The only irony that would please me more, is to see a mobile version of QB64, one that actually worked, beat that grand opening. Well,let's not hold our breath for that, because these days, Rob's Chevy Chase, and we're not.

Pete

Posted on Nov 14, 2014, 3:16 PM

Respond to this message   

Return to Index


*Dan Ackroyd, not Chevy Chase

by (no login)

Posted on Nov 14, 2014, 3:29 PM

Respond to this message   

Return to Index


Can we please just throw Chevy a bone!

by Pete (Login The-Universe)
Admin

Wow, it was Dan! Too many years ago or me I guess. I never watch reruns, just a few of the originals from the mid 1970s. Poor Chevy didn't even have that line, bummer! Another comedian beat by an addiction to co.. ah back pills.

Well, Chevy was in the best comedy about golf, Caddyshack, but also the worst comedy about golf ever, Caddyshack 2. I don;t think that is the case for SDL. SDL 2 looks like an even better version, better licensing, and I wouldn't be surprised if they will offer a stand-alone option for exe files.

Hey thanks for the trip down memory lane, even if I stumbled once along the way.

Pete



Posted on Nov 14, 2014, 3:54 PM

Respond to this message   

Return to Index


*...but nobody could fall like Chevy (frequently as Gerald Ford)!

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 14, 2014, 4:13 PM

Respond to this message   

Return to Index


* But at least Jerry always fell to the Right.

by GWB (Login The-Universe)
Admin

Posted on Nov 14, 2014, 4:27 PM

Respond to this message   

Return to Index


I just put up $1,000 for someone to cook QB64 up

by Clippy (Login burger2227)
R

For once I'd like to pay up...

Posted on Nov 14, 2014, 4:10 PM

Respond to this message   

Return to Index


* Slave wages. Probably 300+ hours of work. At least pay minimum wage.

by Liberal Media (Login The-Universe)
Admin

Posted on Nov 14, 2014, 4:32 PM

Respond to this message   

Return to Index


What Minimum wage? WAY MORE than you or the GOP would pay

by Clippy (Login burger2227)
R

Some in the GOP want to ABOLISH it totally! More people working for Walmart and McDonald wages and getting subsidized by the Government until the GOP CUTS that off too!

I WELCOME others to toss their money in the hat! Set it up and I'll put my money in an ESCROW account where others can contribute whatever they can afford. Maybe I'll do that myself, but I want to do something soon!

Posted on Nov 14, 2014, 4:50 PM

Respond to this message   

Return to Index


Hysterical!

by Pete (Login The-Universe)
Admin

So let's go with the 300 hours. Id; say a junior programmer makes what, about $50 an hour? Oh, and then there are benefits, meaning you should also kick into his pension, and maybe throw in some Obamacare while you're at it. So I'd say you are looking at paying out about $22,000.

See, living up to the hype isn't so easy when it's for real, is it?

Pete

Posted on Nov 14, 2014, 5:10 PM

Respond to this message   

Return to Index


The mission is not that hard!

by Clippy (Login burger2227)
R

QB64 already converts our code to C++ so it should not be too hard to go from there! Many programmers already convert C code to Android and soon Windows Phone.

I am currently looking at the latest FREE Visual Studio offering:

Visual Studio Community 2013
This FREE*, full-featured IDE is perfect for students, open source contributors, and developers building compelling apps – even for Windows, iOS, and Android devices.

With Galleon's blessing and a running start he could charge a reasonable price and pay the developer a percentage after that. Maybe even pay us back... not that I need it.



Posted on Nov 14, 2014, 6:00 PM

Respond to this message   

Return to Index


Rob is too busy practicing for his next shark jump.

by Pete (Login The-Universe)
Admin

My Android BASIC code is translated to C. I recall some crap at QB64 about needing to convert QB64 to JAVA, and it just isn't the case. Still, there is a lot of work that would need to be done to QB64 on things that are mobile specific such as touch screen gestures, etc. It would take awhile. That "Convert to Android" in the QB64 IDE was a shark jump onto itself. Rob should just changed it to "Convert to Islam." At least that will give you 40 virgins when your app dies on arrival.

Pete

Posted on Nov 14, 2014, 6:10 PM

Respond to this message   

Return to Index


*40 virgins!?! I thought it was 75!! (Damn, how do you disarm this stupid thing?)

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 14, 2014, 6:56 PM

Respond to this message   

Return to Index


Don't panic. Steve is busy adding more virgins as we speak!

by Pete (Login The-Universe)
Admin

And it's a good thing he doesn't live in California. They are pretty hard to ind out here.

Pete

Posted on Nov 14, 2014, 7:04 PM

Respond to this message   

Return to Index


* but unless he gets help from rob, he never will be able to call it virgin mobile.

by not really mennonite (Login The-Universe)
Admin

Posted on Nov 14, 2014, 7:07 PM

Respond to this message   

Return to Index


Once we get the process going bugs could be worked out

by Clippy (Login burger2227)
R

The mouse is the touch screen. Gestures would need to be added to enlarge etc.

I'd just like to be able to run my Calendos calendar program on it. All it needs is a year entry and a button press.

I think Rob would be a lot more willing to get er done if he had it started well. We've got a few people working under the hood so who knows...

Posted on Nov 14, 2014, 8:51 PM

Respond to this message   

Return to Index


* Do you have the code to that program posted anywhere?

by Pete (Login The-Universe)
Admin

Posted on Nov 14, 2014, 9:35 PM

Respond to this message   

Return to Index


I can post it or give a download link

by Clippy (Login burger2227)
R

I have to change a few things that I find annoying on it like the beeps and actual time readout perhaps.

The program basically creates a calendar of every month a press at a time of entered years or the current year if no year is entered. It also shows Federal Holidays and Easter.

Posted on Nov 15, 2014, 6:46 AM

Respond to this message   

Return to Index


As long as it is not a link to an exe download, sure.

by Pete (Login The-Universe)
Admin

Either post it in the big forum or link the download to the source in the code forum.

I have an appointment book. One o the sub functions is to produce a perpetual calendar. I don't care about holidays, as I never seem to take time off, anyway. Last vacation, 17 years ago. Anyway in terms o mobile conversion, my problem would be spacing issues, only about 25 lines across instead of 80, and unicode. I miss the ASCII borders you can make in QB. So if I wanted to convert mine, I would have to restructure it,and make use of a lateral scrolling algorithm.

Pete

Posted on Nov 15, 2014, 8:32 AM

Respond to this message   

Return to Index


Unicode has all the box characters Screen 0 did

by (no login)

found all over the Unicode set. Unless you get the font and height just right, there will be thin blank lines visible between each row.

Posted on Nov 15, 2014, 8:36 AM

Respond to this message   

Return to Index


Posted in Big Program Forum

by Clippy (Login burger2227)
R

Its not that huge. Uses a funky leap year and first day of year calculator based on the year 2000.

Gotta know when the year starts to set up the month blocks correctly.

Also finds holidays by date or week number for Thanksgiving and Monday holidays. Also has voting day and Easter.

Posted on Nov 15, 2014, 10:34 AM

Respond to this message   

Return to Index


I converted it to run in Android, and posted it in the Mobile BASIC Forum.

by Pete (Login The-Universe)
Admin

Requires Android setting changed to 16 pt font, and locate column row instead of row column, which is the default. Cannot get a nice border around it, as Android does not support extended ASCII characters, but other than that, it works.

Pete

Posted on Nov 15, 2014, 2:41 PM

Respond to this message   

Return to Index


Of course, you can fake extended characters...

by TheBOB (Login qb432l)
Mod

...by making designs or borders out of printable characters, such as "_", "#" or "|", etc. Do you have colors with Android?

Just a thought.

-Bob

Posted on Nov 16, 2014, 6:31 AM

Respond to this message   

Return to Index


Re: Of course, you can fake extended characters...

by Pete (Login The-Universe)
Admin

That's what I did, but it also looks fine without a border.

Android has colors, but so ar I cannot find a way to set the background color, only text color. It does allow rgb in text though, so all colors and hues can be used.

It ignores CHR$(0). 219 and 255 are extended, and not the same as QB, so no way to make a solid block.

Pete

Posted on Nov 16, 2014, 7:28 AM

Respond to this message   

Return to Index


*Sounds workable--plus a black background ain't so bad for most things.

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 16, 2014, 1:39 PM

Respond to this message   

Return to Index


Now all I gotta do is figure out how to load it...

by Clippy (Login burger2227)
R

I found Basic4android. Is that the one to use?

What is the WHILE -1 thing? While what's true? I see BREAK too. How does it progress, what do you have to use?

Can we use LINE graphics in it? I assume they use similar text blocks versus pixels.

Maybe even use image files for the the interface?

Posted on Nov 16, 2014, 7:30 AM

Respond to this message   

Return to Index


AndroidBASIC docs and download....

by Pete (Login The-Universe)
Admin

http://androidbasic.ninja-web.net/man/indexe.html

Google Play Download:https://play.google.com/store/apps/details?id=and.bas

I think it costs about $6, so you en up saving $994 over waiting for QB64.

Not hard to convert what I posted back to QB, either.

Color col() - just remove the col() part and leave the number.

ENDIF to END IF

BREAK to EXIT WHILE

PAUSE to SLEEP with the number divided by 1000.

DATE$ is written YEAR\MO\DAY so change to MO\DY\YEAR when converting.

WHILE is supported, DO is not. WHILE -1 WEND is the same as DO LOOP.

-----------------------

Pete





Posted on Nov 16, 2014, 7:47 AM

Respond to this message   

Return to Index


SCREEN [Text],[Graphic],[Sprite],[Bg]

by Clippy (Login burger2227)
R

SCREEN 1,1,0,0 is text and graphics

LINE(x1,y1)-(x2,y2) [,color] [,|b or bf|]

color rgb(255,0,0) 'red

Posted on Nov 16, 2014, 8:09 AM

Respond to this message   

Return to Index


$3.20 now how do I load the program from here?

by Clippy (Login burger2227)
R

I can't even find Copy or paste and have no idea where files are on my device.

I have BAS files on Dropbox, but my device asks to download a program that can open them. Don't see any way to LOAD anything but the example BAS files in storage...

What kind of editor is this? One that cannot copy code?

Posted on Nov 16, 2014, 9:27 AM

Respond to this message   

Return to Index


Re: $3.20 now how do I load the program from here?

by Pete (Login The-Universe)
Admin

Get the 920 text editor app. That one is free. You can send your drop box files to your phone, and copy and paste them to 920. Then just save it to your and.bas older.

What I do is make a USB connection from Android to my PC. I then open up the Android folder on Explorer in my PC. You can't access it directly, but... I write my code in notepad in my PC, save it to a folder in my PC, then I do a file copy/paste with the mouse from my PC older to the and.bas folder. That works. It beats typing code on the Android keyboard.

USB on Android should have an option to connect as "a media device" When you plug the USB cable into your PC, it should show up in your drive list.

Pete

Posted on Nov 16, 2014, 10:02 AM

Respond to this message   

Return to Index


The DropBox files are already on the tablet

by Clippy (Login burger2227)
R

I can't find a way to move anything anywhere. The editor is useless if I got to type everything in again.

What I need is something to organize the tablet's files so I can load them from that silly folder.

My tablet doesn't have USB either.

Posted on Nov 16, 2014, 10:15 AM

Respond to this message   

Return to Index


Try that 920 text editor.

by Pete (Login The-Universe)
Admin

LINE (80,40)-(460,264),hsv(160,25,80),b

I edited that into the Mobile Forum post. It draws a nice box around the calendar.

Your Android folder to run files in should be: storage/emulated/0/and.bas/

Android BASIC settings, accessible by touch on the three small squares icon top right, allows you to save / access files on internal storage or SD card. Mine is set to SD card.

Pete

Posted on Nov 16, 2014, 10:23 AM

Respond to this message   

Return to Index


Load gives me nothing but that storage/emulated/O/and.bas folder

by Clippy (Login burger2227)
R

Is that a 0 or an O even? Weird!

How would I transfer a BAS file from Dropbox to it? How would I Paste anything into that editor?

What's the LINE hsv values do?

Posted on Nov 16, 2014, 10:58 AM

Respond to this message   

Return to Index


Found another program for free called X11

by Clippy (Login burger2227)
R

At least it knows what a BAS file is and runs it automatically.

Unfortunately it seems to find more errors than good code too! Scrapped it already.

So I was gonna try to use your program on my PC, but it says it has already been installed...

I got a file browser, but I can't seem to get that working well either!

Posted on Nov 16, 2014, 12:39 PM

Respond to this message   

Return to Index


X11 would be great if it wasn't x-ridden with bugs.

by Pete (Login The-Universe)
Admin

Good documentation, but poor attention to detail. LOCATE is horribly messed up, that's why I dropped it. It was lacking some other important element, too, but I cannot recall what that was anymore. I would have to make a unction to adjust LOCATE before anything I have would run on it correctly.

Pete

Posted on Nov 16, 2014, 8:13 PM

Respond to this message   

Return to Index


Re: Load gives me nothing but that storage/emulated/O/and.bas folder

by Pete (Login The-Universe)
Admin

Get a text editor installed in your Android device. I recommend that free 929 text editor on Google Play. Visit the forum and copy and paste the Android conversion of your calendar to that text editor, and save it as a .bas file in your storage/emulated/O/and.bas folder. Then just open AndroidBASIC, load it, and run C to get a compiled exe.

Pete

Posted on Nov 16, 2014, 8:36 PM

Respond to this message   

Return to Index


I finally got SE File Manager to copy the files

by Clippy (Login burger2227)
R

I still couldn't get directly into the Drop Box folders, but I found that if I ZIP up a BAS file in my tablet's DropBox Public folder, it will put it into the SD Data area. A weird path to follow. Then I highlight the ZIP in SE and goto More and Extract into the same Public Folder I can find on my tablet. Then I use SE to copy to the and.bas folder.

Then the missing integer division backslashes got me so I had to edit the program some more. After abnout five times, I got it to run. All I saw was the day numbers go scrolling up the screen...

Posted on Nov 17, 2014, 7:42 AM

Respond to this message   

Return to Index


Re: I finally got SE File Manager to copy the files

by Pete (Login The-Universe)
Admin

I redid the mobile upload post using a different posting method. That corrected the backslash problem.

Try putting that one one your tablet and run it, but first...

Open Android-BASIC and find "Settings" on the same menu you open to load or run a program.

Change as follows:

Font size from 24 to 16.

coordinates from 0,0 y,x to 1,1 x,y, otherwise it will mess up all the LOCATE statements.

Android-BASIC scrolls automatically i you reach or pass the last printable column.

Pete


Posted on Nov 17, 2014, 8:27 AM

Respond to this message   

Return to Index


font 24 worked OK except for the box

by Clippy (Login burger2227)
R

It was set to 40 default. The red and purple colors aren't working. Instead of COL() you could try RGB(255,0,0).

The 0,0 y,x only messes up by one instead of having to swap them throughout existing basic programs.

Seems to me that whoever wrote this only knows a little about Basic. They got text and graphics confused!

Maybe we could help this guy? LOL

So how is the App made after editing?

Posted on Nov 17, 2014, 8:45 AM

Respond to this message   

Return to Index


Re: font 24 worked OK except for the box

by Pete (Login The-Universe)
Admin

At the top o the menu, touch Run C. That will translate it to c code. Runs a lot faster, too.

When I first ran a test program, it messed up LOCATE. That's when I notice it switched x and y from how QB handles text. I was happy to see I could swap that in SETTINGS.

If 24 works on your Android, it is probably because it has a wider screen than the phone-like type I am using. It centers almost perfectly on mine.

There is no support for this product that I can find. It has a weird forum that opened up in August, with only one post. The developer is oriental. Loved the part about translating "sauce" code.

Pete

Posted on Nov 17, 2014, 9:01 AM

Respond to this message   

Return to Index


Well where is the application. Don't see anything new.

by Clippy (Login burger2227)
R

Yeah my tablet is 7" tall and 4" wide. It was really hard to see when smaller. That's one reason I never got a smart phone too. I can't see and I can't thumb type well either.

Posted on Nov 17, 2014, 9:07 AM

Respond to this message   

Return to Index


Re: Well where is the application. Don't see anything new.

by Pete (Login The-Universe)
Admin

I do not believe the developer has made it to a stand-alone app phase, yet. I just run emulated in C. You can save your code as c code, by loading your program and instead o running it, type SAVE "myprogram.c" The .c extension converts it. I use 929 text to open and view, and yes, it is C code. You would then need to work that c into an exe, and load it to your Android device to have a stand-alone app.

Pete

Posted on Nov 17, 2014, 10:01 AM

Respond to this message   

Return to Index


ES file manager has a text mode too. Well we are closer anyhow.

by Clippy (Login burger2227)
R

I can wait to see how it goes. Can I use QB64's C?

Posted on Nov 17, 2014, 10:10 AM

Respond to this message   

Return to Index


Re: ES file manager has a text mode too. Well we are closer anyhow.

by Pete (Login The-Universe)
Admin

Well it would take some experimenting to see just what c code would run properly as an Android exe. maybe this developer had thought that through. I would try a smaller program, and grab a qb64 conversion and compare it to what Android c looked like or starters. O course what we don't know is i the developer put anything special into the interpreter to make the code run properly in an Android device. I don't pretend to know anything about this part o the field, so this would all be guess work or me. The developer does have a listed BASIC-C converter or a PC listed here:

http://androidbasic.ninja-web.net/man/bastoc.html

It looks like something he may have not finished, though.

Pete



Posted on Nov 17, 2014, 10:19 AM

Respond to this message   

Return to Index


* 72 houri

by Michael Calkins (Login MCalkins)
Moderator

Posted on Nov 15, 2014, 5:38 AM

Respond to this message   

Return to Index


LOL, don't you mean 71.86 hours Mr. Spock?

by Pete (Login The-Universe)
Admin

Michael, you must be non-union!

If your time estimate is closer than mine, I'm surprised Rob hasn't just pushed ahead with this. Spare time, a couple of months. I mean he put that tab to compile for Android in the IDE, but then totally bailed on debug, support, and needed development to get it to work.

I'm still pretty upset with the project, and upset with myself for maintaining faith in it over the past two years on the road to nowhere with GLUT. That's why I don't buy the 72 hours, either. Nothing associated with QB64 moves along in a timely fashion anymore.

I you wanted to tackle it, you should try and get an email to Rob and asked to be put on as the Android Project Manager. Get at least some formal organization over there in that house of cards. Hey, at least the joker put up some money, now all you have to do is get the king to go or it, and make sure the Jack o spades, rakes, and hoes doesn't plow through your field.

Pete

Posted on Nov 15, 2014, 8:46 AM

Respond to this message   

Return to Index


* no, not hours. (URL)

by Michael Calkins (Login MCalkins)
Moderator

http://en.wikipedia.org/wiki/Houri

Posted on Nov 15, 2014, 9:58 AM

Respond to this message   

Return to Index


ROFL - I thought that was a typo. But they charge by the hour, too.

by Pete (Login The-Universe)
Admin

So getting back to the original estimate of time, how close do you think my estimate of 300 hours to take QB6 from present to Android?

Pete

Posted on Nov 16, 2014, 8:17 AM

Respond to this message   

Return to Index


* I don't know.

by Michael Calkins (Login MCalkins)
Moderator

Posted on Nov 19, 2014, 12:35 AM

Respond to this message   

Return to Index


hey, pete: thanks.

by mn (no login)

i'll more likely than not be back at some point. it's been enough fun for this year. sometime in 2015.

have you spayed or neutered your dog? not saying it should be a law, just saying it saves lives and prevents much suffering.

oh, and if you shut the whole thing down, i won't blame you. not saying you should, just that you can only do so much. i know there's only so much i can do.

i think there's one more subforum that really needs to be archived, but i haven't mentioned it yet. just please don't refrain from doing so on my account. please, remove my tutorial or fix it, okay?

Posted on Nov 13, 2014, 4:14 PM

Respond to this message   

Return to Index


*See you in 2015 -- and thanks for the plug!

by Bob Barker (Login qb432l)
Mod

*

Posted on Nov 13, 2014, 5:16 PM

Respond to this message   

Return to Index


We'll leave a light on for you... but not one of those crappy solar powered ones.

by Pete (Premier Login iorr5t)
Forum Owner

A real high watt bright and shiny one, powered by natural oil, as God intended.

Have fun adventures!

Pete

Posted on Nov 13, 2014, 6:19 PM

Respond to this message   

Return to Index


Solar light is FREE! Oil will cost your kids someday...

by Clippy (Login burger2227)
R

We used solar LONG BEFORE we started burning DIRTY things we found in the ground!

The thing is that oil and coal could reduce the amount of solar light available too.

Posted on Nov 14, 2014, 4:47 AM

Respond to this message   

Return to Index


Re: Solar light is FREE! Oil will cost your kids someday...

by Mr Obvious (no login)

Solar lights are only free if you use them in the daytime when the sun is out.

Otherwise they require batteries to operate at night, and those contain acid and things which are (wait for it) harmful for the environment.

Posted on Nov 14, 2014, 5:55 AM

Respond to this message   

Return to Index


Batteries are a lot less harmful than BURNING OIL or COAL

by Clippy (Login burger2227)
R

Sure ya gotta dispose of batteries safely, but that's true about oil and coal too. Oil and Coal used normally, pollute tons more than batteries could or ever would.

Posted on Nov 14, 2014, 6:04 AM

Respond to this message   

Return to Index


Re: Batteries are a lot less harmful than BURNING OIL or COAL

by Look Closely (no login)

Batteries are more harmful than just "use proper disposal".

First, you have to mine the lead itself. Much like mining coal, this ruins the area around the mnes.

Then it has to be processed and refined to be useful. This process once again uses energy which reduces the "green savings" and damages the environment. A lot of these processing plants have run off and waste dumps that are much worse on rheir environment than fracking is with coal.

http://wattsupwiththat.com/2011/08/31/solars-lead-balloon-of-pollution-in-developing-countries/


How clean is Solar anyway?

Frankly, in china, it is very bad because their manufacturing processes are powered by truly dirty coal plants, toxics are routinely released into the air and contaminate both land and water, and sterilize land such that crops just don’t grow anymore.

http://www.scientificamerican.com/article.cfm?id=explosive-gas-silane-used-to-make-photovoltaics

More specifically, lets talk about polysilicon manufacturing, silane gas and silicon tetrachloride.

This article is a stark reminder of the realities of the Green Illusion….select snippets below.

http://www.washingtonpost.com/wp-dyn/content/article/2008/03/08/AR2008030802595.html

“For each ton of polysilicon produced, the process generates at least four tons of silicon tetrachloride liquid waste. ”

Luoyang Zhonggui factory makes polysilicon, is one of China’s largest operating plants, and is a key supplier to Suntech Power Holdings, a solar panel company whose founder Shi Zhengrong recently topped the list of the richest people in China.

Chinese companies are saving millions of dollars by not installing pollution recovery.
If environmental protection technology is used, the cost to produce one ton of polysilicon is approximately $84,500. But Chinese companies are making it at $21,000 to $56,000a ton.

In sharp contrast to the gleaming white buildings in Zhonggui’s new gated complex in Gaolong, the situation in the villages surrounding it is bleak.

The villagers said most obvious evidence of the pollution is the dumping, up to 10 times a day, of the liquid waste into what was formerly a grassy field. Eventually, the whole area turned white, like snow.

The worst part, said Li, 53, who lives with his son and granddaughter in the village, is that “they go outside the gates of their own compound to dump waste.”

“We didn’t know how bad it was until the August harvest, until things started dying,” he said.

SO….suntech solar panels adorn many a roof and array in the US and California today, earning ‘carbon credits’….so I’m wondering, how many acres of Chinese farmland are sterilized and polluted each year per MW produced?

Other links:

http://solarscorecard.com/?cat=9

http://www.fastcompany.com/1744123/embargo-until-arpil-5-at-6-am-et-silicon-valley-toxics-coalition-reveals-the-dirtiness-of-th

Posted on Nov 14, 2014, 6:22 AM

Respond to this message   

Return to Index


STILL BETTER than OIL and COAL burning up our atmosphere

by Clippy (Login burger2227)
R

Yap all ya want about batteries too, but there WILL be better ways to STORE solar and wind power down the road!

All we need is to GIVE those industries the $20 BILLION currently handed to a very profitable oil industry that DOESN'T NEED IT or DESERVE IT!

Big Oil and coal have NO PLANS to clean their acts up! They FIGHT every attempt!

[linked image]

Posted on Nov 14, 2014, 6:58 AM

Respond to this message   

Return to Index


This thread is not permitted

by Solitaire (no login)

unless you write some QB code about the topic.

Posted on Nov 14, 2014, 6:10 PM

Respond to this message   

Return to Index


pete, can you remove this from the downloads section?

by mn (no login)

http://www.network54.com/Realm/QBZips/mpgitqbi.zip

there's no way for me to demand it, i mean the license allows anyone to host it on their site without my permission. (i'm not trying to revoke that license, nor would i try.)

but it really irks me that it looks like it's one of clippy's tutorials. no one else has to put up with that. i'd rather see it removed than this continue. i've mentioned it many times before and not received a reponse. in short, i think i've been incredibly patient and polite about it, regardless of whether this is getting annoying or not.

i don't care what the solution is. do *whatever is easiest*, if you would. like i said, i'm not in any position to demand anything, i'm just asking.

Posted on Nov 13, 2014, 6:50 AM

Respond to this message   

Return to Index


YEAH, get him out of my tutorial list! I only have one listed...

by Clippy (Login burger2227)
R

All you have to do is remove Clippy's List from above mine. Maybe he was here first but WHOGAS?

Posted on Nov 13, 2014, 7:04 AM

Respond to this message   

Return to Index


*either one of those would be fine, thanks.

by mn (no login)

Posted on Nov 13, 2014, 7:07 AM

Respond to this message   

Return to Index


* Added a heading separator.

by Pete (Premier Login iorr5t)
Forum Owner

Posted on Nov 13, 2014, 6:17 PM

Respond to this message   

Return to Index


Dammit Jim, I'm a chiropractor, not a librarian!

by Pete (Login The-Universe)
Admin

That's about how I eel these days. I've been working on making some parts of programs into libraries. It seems to be very time consuming, to arrange the code so it can work as a stand-alone demo, but also have a couple of variables switched, and be an include library. It's a strange feeling, knowing the work is important, but also a sense of time wasted in that I could be coding new stuff.

Pete

Posted on Nov 13, 2014, 2:39 AM

Respond to this message   

Return to Index


you're being forced into one by your constraints

by mn (no login)

which is fine, anyone who (EVER) loved dos knows that some constraints can produce some pretty fun solutions/ideas.

but your constraints are pretty easy to break if they're too restrictive. you're incredibly lucky! developing for phones is usually incredibly tedious and (imo,) unrewarding. the platform is just too... well, it's like you have all these new toys, but you're only allowed to play with them in alphabetical order, between 3:30 and 3:45 in the afternoon, on a little mat that's 16 inches square. the potential for fun seems obtusely small compared to what it could be.

obviously i'm not a fan of smartphones, or even tablets (yet.) but i gave them a real chance, and i recommend a netbook (if you can find one.) i didn't know how great netbooks were, until i carried around a smartphone and a tablet until i got bored with both.

what i'm saying is, that smartphones probably are the future but the present is tedious. and although you will likely just continue with your project (and sincerely, good for you) on the chance that you really do start to itch for some more immediate gratification, there's always "real computers" with their relative lack of constraints to play with (other than weight and physical size and relative lack of portability.) graphics are pretty fun on a big screen, and most things are still fun when you don't have to jump through android's hoops.

just sayin'. it's not like you're going to give up your project, but back in the world of desktops and notebooks, development can be much faster going. perhaps learn a new language that won't require you to be a librarian? no, no, no, that's only an example.

Posted on Nov 13, 2014, 3:17 AM

Respond to this message   

Return to Index


Everybody knows that NETBOOKS are garbage!

by Clippy (Login burger2227)
R

Cheap imitation laptops not worth the money!

Want gratification? I'll take a good laptop over a tablet or Iphone anyday!

Posted on Nov 13, 2014, 5:50 AM

Respond to this message   

Return to Index


yes, everyone on zdnet. also you're supporting my point...

by mn (no login)

a good laptop is great, and totally fits what i'm talking about in terms of gratification.

however, a netbook is still more portable than a "good laptop." i've had some GREAT laptops (4gb ram, multiple cores) but my netbook performs nicely because i run well-designed software.

some new laptops (still bigger than netbooks) are being made a little smaller and thinner now, so they have some of of the portability of netbooks.

only talking about size and portability. but if you're buying into all the marketspeak, netbooks are a useless fad that we're thankfully beyond now.

Posted on Nov 13, 2014, 5:58 AM

Respond to this message   

Return to Index


It occurs to me, Bones...

by TheBOB (Login qb432l)
Mod

...that the original mission was to be 5 years, and look what happened! There will always be dreary moments, of course, and not every episode is an "adventure", but still, in the long run, your "librarian" duties might prove to be the very impetus of that "new stuff".

-Bob

Posted on Nov 13, 2014, 4:25 AM

Respond to this message   

Return to Index


*Sure, be an enabler!

by Scotty (no login)

Posted on Nov 13, 2014, 4:45 AM

Respond to this message   

Return to Index


Re: It occurs to me, Bones...

by Pete (Login The-Universe)
Admin

Puts phaser on stun and shoots self in foot.

Ouuuuuuuuu!

The monkey work required is getting old fast. I have to...

1) INCLUDE it, and since it runs when included, a variable must be made to tell it to bypass the whole thing the first time through.

2) In the part o the program that call the routine in the library, assign the values to the dynamic variables and pick up any static variables the first time the library is used, then run the routine.

3) I also like to make the library have a demo option, so I can run it independently. That helps with edits in the future.

Pete

Posted on Nov 14, 2014, 8:54 AM

Respond to this message   

Return to Index


*Sounds good--"To boldly go where no man has more-or-less gone before!"

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 14, 2014, 11:20 AM

Respond to this message   

Return to Index


PNG encoder and decoder posted

by Daniel Nice (Login uwishuweremrp)

Today I posted a PNG encoder and PNG decoder written in BASIC 7.1 PDS.
I posted in the "Big QB Programs" area.

Posted on Nov 11, 2014, 2:15 PM

Respond to this message   

Return to Index


Link to big QB programs area

by Daniel Nice (Login uwishuweremrp)

Posted on Nov 11, 2014, 2:19 PM

Respond to this message   

Return to Index


*Looks like it would work great (I don't have 7.1). Sorry Pete, never studied .PNG files.

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 13, 2014, 1:28 AM

Respond to this message   

Return to Index


That was Dan Nice of you.

by Pete (Login The-Universe)
Admin

Maybe TheBOB could clue me in on what to do with it. My wish would be loading a png, editing it on the screen, and then saving the screen, much like Paint.net. That would be very cool, if it does that.

Thanks or posting it. Sorry I'm graphically challenged.

Pete

Posted on Nov 11, 2014, 6:58 PM

Respond to this message   

Return to Index


* COMMON SHARED is only needed to pass variable data to another CHAINed module.

by Clippy (Login burger2227)
R

Posted on Nov 12, 2014, 5:53 AM

Respond to this message   

Return to Index


re: common shared

by Daniel Nice (Login uwishuweremrp)

You are correct: In this case, COMMON is not required.

But, in many of my programs, data is shared between modules (not just chained ones), so I got into the habit of specifying that.

Posted on Nov 12, 2014, 6:42 AM

Respond to this message   

Return to Index


I used COMMON SHARED for the same reason...

by Pete (Login The-Universe)
Admin

I had to beat the memory limits in QB by using multi-modular coding, which does require COMMON SHARED to pass variables.

Pete

Posted on Nov 12, 2014, 4:47 PM

Respond to this message   

Return to Index


* Sorry guys, lost two replies trying to clean up all the duplicate posts.

by Pete (Login The-Universe)
Admin

Posted on Nov 12, 2014, 4:50 PM

Respond to this message   

Return to Index


*Was one of the replies you trashed my PNG-PONG joke?

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 13, 2014, 1:31 AM

Respond to this message   

Return to Index


* You mean the one about how to put a jpeg in an ahole?

by Pete (Login The-Universe)
Admin

Posted on Nov 13, 2014, 2:05 AM

Respond to this message   

Return to Index


My First GRAPHICS Program!

by Pete (no login)

Scr12& = _NEWIMAGE(1180, 620, 256)
SCREEN Scr12&

fontpath$ = ENVIRON$("SYSTEMROOT") + "fontslucon.ttf" 'Find Windows Folder Path.
Scr12& = _NEWIMAGE(1180, 610, 256)
SCREEN Scr12&
fontsize% = 24
style$ = "MONOSPACE"
font& = _LOADFONT(fontpath$, fontsize%, style$)
_FONT font&

'Variables
'
DIM a(100) AS STRING * 80
margintop = 5
marginbottom = 20
marginleft = 28
marginright = marginleft + 24
pageheight = marginbottom - margintop
pagewidtxh = 25
lscrollmax = pagewidtxh * 3
vscrollmax = 25
lscrolllock = 0
vscrolllock = 0
gesture = -1
fcoloxr = 7
bcoloxr = 0
pagefcoloxr = 7
pagebcoloxr = 1
'
COLOR pagefcoloxr, pagebcoloxr
CLS
x = 590: y = 288
CIRCLE (x, y), 272, 0
PAINT STEP(0, 0), 0, 0
' set demo screen
'
COLOR fcoloxr, bcoloxr
'
i = 0
WHILE -1
   i = i + 1
   READ a(i)
   IF MID$(a(i), 1, 3) = "EOF" THEN
      a(i) = ""
      EXIT WHILE
   END IF
   IF margintop + i - 1 <= marginbottom THEN
      LOCATE margintop + i - 1, marginleft
      PRINT MID$(a(i), 1, pagewidtxh);
   END IF
WEND
'
LOCATE margintop, marginleft, 1, 7, 7
yrow = margintop
xpos = marginleft
'
WHILE -1
   GOSUB cursoron
   IF keyboard$ <> "" THEN
      SELECT CASE keyboard$
         CASE CHR$(27)
            SYSTEM
         CASE CHR$(0) + "K"
            IF gesture THEN
               IF POS(0) = marginleft AND lscroll > 0 AND lscroll - pagewidtxh >= -pagewidtxh THEN
                  GOSUB gesture
               ELSE
                  GOSUB lateralscroll
               END IF
            ELSE
               GOSUB lateralscroll
            END IF
         CASE CHR$(0) + "M"
            IF gesture THEN
               IF POS(0) = marginright AND lscroll + pagewidtxh < lscrollmax THEN
                  GOSUB gesture
               ELSE
                  GOSUB lateralscroll
               END IF
            ELSE
               GOSUB lateralscroll
            END IF
         CASE CHR$(0) + "H"
            IF gesture AND vscroll > 0 THEN
               IF CSRLIN = margintop AND vscroll - pageheight >= -pageheight THEN
                  GOSUB gesture
               ELSE
                  GOSUB verticalscroll
               END IF
            ELSE
               GOSUB verticalscroll
            END IF
         CASE CHR$(0) + "P"
            IF gesture THEN
               IF CSRLIN = marginbottom AND vscroll + pageheight < vscrollmax THEN
                  GOSUB gesture
               ELSE
                  GOSUB verticalscroll
               END IF
            ELSE
               GOSUB verticalscroll
            END IF
      END SELECT
   END IF
WEND
'
'
verticalscroll:
SELECT CASE keyboard$
   CASE CHR$(0) + "H"
      IF CSRLIN = margintop AND vscroll > 0 THEN
         vscroll = vscroll - 1
         FOR i = margintop TO marginbottom
            LOCATE i, marginleft
            PRINT MID$(a(i - margintop + 1 + vscroll), lscroll + 1, pagewidtxh);
         NEXT
         LOCATE yrow, xpos
      ELSE
         IF CSRLIN > margintop THEN
            LOCATE CSRLIN - 1, POS(0)
            yrow = CSRLIN
            xpos = POS(0)
         END IF
      END IF
   CASE CHR$(0) + "P"
      IF vscroll < vscrollmax - pageheight THEN
         IF CSRLIN = marginbottom THEN
            IF vscrolllock = 0 THEN
               vscroll = vscroll + 1
               FOR i = margintop TO marginbottom
                  LOCATE i, marginleft
                  PRINT MID$(a(i - margintop + 1 + vscroll), lscroll + 1, pagewidtxh);
               NEXT
               LOCATE yrow, xpos
            END IF
         ELSE
            LOCATE CSRLIN + 1, POS(0)
            yrow = CSRLIN
            xpos = POS(0)
         END IF
      END IF
END SELECT
'
RETURN
'
'
lateralscroll:
SELECT CASE keyboard$
   CASE CHR$(0) + "K"
      IF POS(0) = marginleft AND lscroll > 0 THEN
         lscroll = lscroll - 1
         FOR i = margintop TO marginbottom
            LOCATE i, marginleft
            PRINT MID$(a(i - margintop + 1 + vscroll), lscroll + 1, pagewidtxh);
         NEXT
         LOCATE yrow, xpos
      ELSE
         IF POS(0) > marginleft THEN
            LOCATE CSRLIN, POS(0) - 1
            yrow = CSRLIN
            xpos = POS(0)
         END IF
      END IF
   CASE CHR$(0) + "M"
      IF lscroll < lscrollmax THEN
         IF POS(0) = marginright THEN
            IF lscrolllock = 0 THEN
               lscroll = lscroll + 1
               FOR i = margintop TO marginbottom
                  LOCATE i, marginleft
                  PRINT MID$(a(i - margintop + 1 + vscroll), lscroll + 1, pagewidtxh);
               NEXT
               LOCATE yrow, xpos
            END IF
         ELSE
            LOCATE CSRLIN, POS(0) + 1
            yrow = CSRLIN
            xpos = POS(0)
         END IF
      END IF
END SELECT
'
RETURN
'
'
gesture:
x = 0
IF keyboard$ = CHR$(0) + "M" OR keyboard$ = CHR$(0) + "K" THEN
   gdelay = INT(pagewidtxh / 4)
   jj = pagewidtxh
ELSE
   gdelay = INT(pageheight / 8)
   jj = pageheight
END IF
' Remember to locate to correct margin if using an automated method other than the cursor.
FOR ii = 1 TO jj
   SELECT CASE keyboard$
      CASE CHR$(0) + "M", CHR$(0) + "K"
         GOSUB lateralscroll
      CASE ELSE
         GOSUB verticalscroll
         IF vscroll >= vscrollmax - pageheight OR vscroll = 0 THEN
            EXIT FOR
         END IF
   END SELECT
   IF ii / gdelay = INT(ii / gdelay) THEN
      x = x + .001 * ii * .8
   END IF
   _DELAY x
NEXT ii
RETURN
'
'
cursoron:
xcuron = CSRLIN
ycuron = POS(0)
IF replacechr$ = "" THEN
   replacechr$ = MID$(a(xcuron + 1 - margintop + vscroll), ycuron + 1 - marginleft + lscroll, 1)
END IF

IF MID$(keyboard$, 2, 1) = "R" THEN
   ins = ABS(ins) - 1
END IF

zcursor2 = ABS(TIMER - zcursor1)
IF zcursor2 > .4 OR MID$(keyboard$, 2, 1) = "R" THEN
   blinkon = ABS(blinkon) - 1
   zcursor2 = 0
   zcursor1 = TIMER
END IF

IF blinkon THEN
   IF ins THEN
      PRINT CHR$(177);
   ELSE
      PRINT "_";
   END IF
ELSE
   PRINT replacechr$;
END IF
LOCATE xcuron, ycuron
GOSUB keyroutine
IF keyboard$ <> "" THEN
   IF MID$(keyboard$, 2, 1) <> "R" THEN
      PRINT replacechr$;
      LOCATE xcuron, ycuron
   END IF
   replacechr$ = ""
END IF
RETURN
'
'
keyroutine:
_LIMIT 30
keyboard$ = INKEY$
RETURN
'
'
DATA This is the first line of the sentence
DATA This is the second line of the sentence
DATA The world is black
DATA The world is white
DATA Two men walked into a bar but they should have ducked
DATA The rain in Spain falls mainly on the plain
DATA If I wanted your opinion I would have asked for it
DATA Does this font make my ASCII look big?
DATA This is the first line of the sentence
DATA This is the second line of the sentence
DATA The world is black
DATA The world is white
DATA Two men walked into a bar but they should have ducked
DATA The rain in Spain fall mainly on the plain
DATA If I wanted your opinion I would have asked for it
DATA Does this font make my ASCII look big?
DATA This is the first line of the sentence
DATA This is the second line of the sentence
DATA The world is black
DATA The world is white
DATA Two men walked into a bar but they should have ducked
DATA The rain in Spain fall mainly on the plain
DATA If I wanted your opinion I would have asked for it
DATA Does this font make my ASCII look big?
DATA This concludes the text for the lateral scrolling routine
DATA EOF

Posted on Nov 9, 2014, 11:08 PM

Respond to this message   

Return to Index


well you know, someone just had to make a screen 0 version (may require tweaks)

by mn (no login)

DECLARE SUB PNT (xp, yp, t, r)
DECLARE SUB CIRCL (x, y, r, c)
'Scr12 = _NEWIMAGE(1180, 610, 256)
SCREEN 0


'option gosub

'Variables
'
DIM a$(100)
margintop = 5
marginbottom = 20
marginleft = 28
marginright = marginleft + 24
pageheight = marginbottom - margintop
pagewidtxh = 25
lscrollmax = pagewidtxh * 3
vscrollmax = 25
lscrolllock = 0
vscrolllock = 0
gesture = -1
fcoloxr = 7
bcoloxr = 0
pagefcoloxr = 7
pagebcoloxr = 1
'
a$(1) = "This is the first line of the sentence"
a$(2) = "This is the second line of the sentence"
a$(3) = "The world is black"
a$(4) = "The world is white"
a$(5) = "Two men walked into a bar but they should have ducked"
a$(6) = "The rain in Spain falls mainly on the plain"
a$(7) = "If I wanted your opinion I would have asked for it"
a$(8) = "Does this font make my ASCII look big?"
a$(9) = "This is the first line of the sentence"
a$(10) = "This is the second line of the sentence"
a$(11) = "The world is black"
a$(12) = "The world is white"
a$(13) = "Two men walked into a bar but they should have ducked"
a$(14) = "The rain in Spain fall mainly on the plain"
a$(15) = "If I wanted your opinion I would have asked for it"
a$(16) = "Does this font make my ASCII look big?"
a$(17) = "This is the first line of the sentence"
a$(18) = "This is the second line of the sentence"
a$(19) = "The world is black"
a$(20) = "The world is white"
a$(21) = "Two men walked into a bar but they should have ducked"
a$(22) = "The rain in Spain fall mainly on the plain"
a$(23) = "If I wanted your opinion I would have asked for it"
a$(24) = "Does this font make my ASCII look big?"
a$(25) = "This concludes the text for the lateral scrolling routine"
a$(26) = "EOF"
'
COLOR pagefcoloxr, pagebcoloxr
CLS
x = 590: y = 288
CALL CIRCL(x, y, 272, 0)
CALL PNT(INT(x / 8 + 1), INT(y / 16 + 1), 32, -37)' don't know why screen is returning -37 for chr(219)
' and yes, screen can be used to return color information also
' set demo screen
'
COLOR fcoloxr, bcoloxr
'
i = 0
DO WHILE -1
i = i + 1
IF MID$(a$(i), 1, 3) = "EOF" THEN
a$(i) = ""
EXIT DO
END IF
IF margintop + i - 1 <= marginbottom THEN
LOCATE 1, 1
LOCATE margintop + i - 1, marginleft
PRINT MID$(a$(i), 1, pagewidtxh);
END IF
LOOP
'
LOCATE margintop, marginleft, 1, 7, 7
yrow = margintop
xpos = marginleft
'
WHILE -1
GOSUB cursoron
IF keyboard$ <> "" THEN
SELECT CASE keyboard$
CASE CHR$(27)
SYSTEM
CASE CHR$(0) + "K"
IF gesture THEN
IF POS(0) = marginleft AND lscroll > 0 AND lscroll - pagewidtxh >= -pagewidtxh THEN
GOSUB gesture
ELSE
GOSUB lateralscroll
END IF
ELSE
GOSUB lateralscroll
END IF
CASE CHR$(0) + "M"
IF gesture THEN
IF POS(0) = marginright AND lscroll + pagewidtxh < lscrollmax THEN
GOSUB gesture
ELSE
GOSUB lateralscroll
END IF
ELSE
GOSUB lateralscroll
END IF
CASE CHR$(0) + "H"
IF gesture AND vscroll > 0 THEN
IF CSRLIN = margintop AND vscroll - pageheight >= -pageheight THEN
GOSUB gesture
ELSE
GOSUB verticalscroll
END IF
ELSE
GOSUB verticalscroll
END IF
CASE CHR$(0) + "P"
IF gesture THEN
IF CSRLIN = marginbottom AND vscroll + pageheight < vscrollmax THEN
GOSUB gesture
ELSE
GOSUB verticalscroll
END IF
ELSE
GOSUB verticalscroll
END IF
END SELECT
END IF
WEND
'
'
verticalscroll:
SELECT CASE keyboard$
CASE CHR$(0) + "H"
IF CSRLIN = margintop AND vscroll > 0 THEN
vscroll = vscroll - 1
FOR i = margintop TO marginbottom
LOCATE i, marginleft
PRINT MID$(a$(i - margintop + 1 + vscroll), lscroll + 1, pagewidtxh);
NEXT
LOCATE yrow, xpos
ELSE
IF CSRLIN > margintop THEN
LOCATE CSRLIN - 1, POS(0)
yrow = CSRLIN
xpos = POS(0)
END IF
END IF
CASE CHR$(0) + "P"
IF vscroll < vscrollmax - pageheight THEN
IF CSRLIN = marginbottom THEN
IF vscrolllock = 0 THEN
vscroll = vscroll + 1
FOR i = margintop TO marginbottom
LOCATE i, marginleft
PRINT MID$(a$(i - margintop + 1 + vscroll), lscroll + 1, pagewidtxh);
NEXT
LOCATE yrow, xpos
END IF
ELSE
LOCATE CSRLIN + 1, POS(0)
yrow = CSRLIN
xpos = POS(0)
END IF
END IF
END SELECT
'
RETURN
'
'
lateralscroll:
SELECT CASE keyboard$
CASE CHR$(0) + "K"
IF POS(0) = marginleft AND lscroll > 0 THEN
lscroll = lscroll - 1
FOR i = margintop TO marginbottom
LOCATE i, marginleft
PRINT MID$(a$(i - margintop + 1 + vscroll), lscroll + 1, pagewidtxh);
NEXT
LOCATE yrow, xpos
ELSE
IF POS(0) > marginleft THEN
LOCATE CSRLIN, POS(0) - 1
yrow = CSRLIN
xpos = POS(0)
END IF
END IF
CASE CHR$(0) + "M"
IF lscroll < lscrollmax THEN
IF POS(0) = marginright THEN
IF lscrolllock = 0 THEN
lscroll = lscroll + 1
FOR i = margintop TO marginbottom
LOCATE i, marginleft
PRINT MID$(a$(i - margintop + 1 + vscroll), lscroll + 1, pagewidtxh);
NEXT
LOCATE yrow, xpos
END IF
ELSE
LOCATE CSRLIN, POS(0) + 1
yrow = CSRLIN
xpos = POS(0)
END IF
END IF
END SELECT
'
RETURN
'
'
gesture:
x = 0
IF keyboard$ = CHR$(0) + "M" OR keyboard$ = CHR$(0) + "K" THEN
gdelay = INT(pagewidtxh / 4)
jj = pagewidtxh
ELSE
gdelay = INT(pageheight / 8)
jj = pageheight
END IF
' Remember to locate to correct margin if using an automated method other than the cursor.
FOR ii = 1 TO jj
SELECT CASE keyboard$
CASE CHR$(0) + "M", CHR$(0) + "K"
GOSUB lateralscroll
CASE ELSE
GOSUB verticalscroll
IF vscroll >= vscrollmax - pageheight OR vscroll = 0 THEN
EXIT FOR
END IF
END SELECT
IF ii / gdelay = INT(ii / gdelay) THEN
x = x + .001 * ii * .8
END IF
t = TIMER + x: DO: LOOP UNTIL TIMER > t OR TIMER < t - 30
'_DELAY x
NEXT ii
RETURN
'
'
cursoron:
xcuron = CSRLIN
ycuron = POS(0)
IF replacechr$ = "" THEN
replacechr$ = MID$(a$(xcuron + 1 - margintop + vscroll), ycuron + 1 - marginleft + lscroll, 1)
END IF

IF MID$(keyboard$, 2, 1) = "R" THEN
ins = ABS(ins) - 1
END IF

zcursor2 = ABS(TIMER - zcursor1)
IF zcursor2 > .4 OR MID$(keyboard$, 2, 1) = "R" THEN
blinkon = ABS(blinkon) - 1
zcursor2 = 0
zcursor1 = TIMER
END IF

IF blinkon THEN
IF ins THEN
PRINT CHR$(177);
ELSE
PRINT "_";
END IF
ELSE
PRINT replacechr$;
END IF
LOCATE xcuron, ycuron
GOSUB keyroutine
IF keyboard$ <> "" THEN
IF MID$(keyboard$, 2, 1) <> "R" THEN
PRINT replacechr$;
LOCATE xcuron, ycuron
END IF
replacechr$ = ""
END IF
RETURN
'
'
keyroutine:
'_LIMIT 30
SLEEP 1
keyboard$ = INKEY$
RETURN

'
'
SUB CIRCL (x, y, r, c)
'CIRCLE (x, y), 272, 0
FOR p = -314! TO 314! STEP 3
yc = INT(y / 16 + 1 + (SIN(p / 100#) * r / 16))
xc = INT(x / 8 + 1 + (COS(p / 100#) * r / 8))
IF yc > 0 AND yc < 26 AND xc > 0 AND xc < 81 THEN
LOCATE yc, xc
COLOR c
PRINT CHR$(219);
COLOR 7
END IF
NEXT p
END SUB

'
'
SUB PNT (xp, yp, t, r)
x = xp 'int(xp / 8 + 1)
y = yp 'int(yp / 16 + 1)
'paint (x,y), 0
'if x = 80 and y = 30 then color 0 : locate 30,80: print chr$(219); :locate 29,79: color 7 : exit sub
IF x > 0 AND x < 81 AND y < 31 AND y > 0 THEN
IF t = r THEN EXIT SUB
IF SCREEN(y, x) <> t THEN EXIT SUB
'SLEEP 1
COLOR 0: LOCATE y, x: PRINT CHR$(219); : LOCATE 1, 1
CALL PNT(x - 1, y, t, r)
CALL PNT(x + 1, y, t, r)
'this fill routine works, but uncomment those two lines and find out
'if you have enough stack space to run it beyond one horizontal line
'CALL PNT(x, y - 1, t, r)
'CALL PNT(x, y + 1, t, r)
END IF
END SUB

Posted on Nov 10, 2014, 3:07 AM

Respond to this message   

Return to Index


LOL - If I wanted a SCREEN 0 version, I would have asked Steve... in about 2 years.

by Pete (no login)

I ran the code. Did it run correctly in B, because it doesn't in QBasic. Circle is way over to the lower right and way too big. Scrolling, replacement characters, etc., would need some work, too, but I get it, it's a spoof, and funny one.

The one I posted is actually the same SCREEN 0 version I already posted in the code forum.

http://www.network54.com/Forum/754391/thread/1415333260/last-1415333260/Scrolling+Text

All I did was encase the text with a circle, instead of a square. Still, I had to add my cursor routine, and change the way it finds the replacement character, as the SCREEN() function is not or graphics.

I tried another with _PRINTSTRING. That is a bit more complicated to code, but I did work out a decent algorithm or the screen size, font, and mapping.

So for anyone expecting impressive sprites, animation (well the text does scroll) or TheBOB-like graphics, nope, just that same SCREEN 0 stu I,m always up to, but now in a circle!

I will save the template, and use it to run all of Steve's programs. That way I can always state I'm running circles around Steve!

Pete

Posted on Nov 10, 2014, 7:45 AM

Respond to this message   

Return to Index


if it didn't look like garbage, that's a good sign

by mn (no login)

i'll be happy if it showed a circle and it was solid.** ...i can do those giant screen resolutions in python. in basic, i just do whatever i have to to make it run in screen 12.

so first i got your program running in screen 12. and then i made routines that did the same thing in screen 0.

im happiest with the paint fill. that's my first basic (and first text mode) paint fill routine, something i've wanted to understand since i was in single digits.

** and it demonstrates the difference between a 16 bit stack and a 32 bit stack, IF you uncomment two of the four recursive lines inside PNT. (if you don't, you still got the gist of it.)

glad to hear we've got more "screen 0" stuff to expect from you (now with 1000% more pixels!)

Posted on Nov 10, 2014, 8:49 AM

Respond to this message   

Return to Index


Why you always picking on Steve?

by Clippy (Login burger2227)
R

He's a handicapped farmer just helping fix QB64 for us while Android is totally ignored...

If its because he gets EIC or SNAP Benefits, he earned them... he didn't plant anything this year...

Posted on Nov 11, 2014, 8:36 AM

Respond to this message   

Return to Index


* Because I'm retired and I don't like a challenge. :)

by Pete (Login The-Universe)
Admin

Posted on Nov 11, 2014, 9:34 AM

Respond to this message   

Return to Index


*(Sob, sob..) For some reason I feel like a proud papa--well, older brother, anyway.

by TheBOB (Login qb432l)
Mod

*

Posted on Nov 10, 2014, 6:46 AM

Respond to this message   

Return to Index


a question for KN Kewbie Newbie about Q Basic Beautifier (url)

by mn (no login)

http://www.network54.com/Forum/13959/message/941345594/

code posted in october 1999.


-> -> so, what are we missing in this version, in terms of features? <- <-


i fixed the goto (i'm not anti-goto, it's fine if you want it, i had my reasons) by simply violating D-R-Y. in some cases, R-Y is better than goto.

especially when there's only one instance of goto outside of error trapping (i left that goto alone, i may get to it later) and "R" is a single instance.

Posted on Nov 8, 2014, 11:18 PM

Respond to this message   

Return to Index


Let's call that version QBB 0.9. Almost ready for prime time

by Kewbie (Login Kewbie)
R

It has the comment bug in it, fairly easily fixed. And it doesn't handle multi-statement lines. I'm not sure what it does with them, but probably nothing viable.

I have a more recent version that I'll publish in the Big Programs forum when I get home, providing I can find a copy of it spinning around somewhere.

To fix the comment bug, just change

IF CmntQUO% AND CmntREM% THEN

to

IF CmntQUO% > 0 AND CmntREM% > 0 THEN

in the FindComment% function. I'm pretty sure that takes care of it.

Kew

Posted on Nov 9, 2014, 8:28 AM

Respond to this message   

Return to Index


Your code needs some cleaning up...

by Pete (no login)

It has a case of do-do in it.

CASE "doDO": doDO

Pete :)

Posted on Nov 9, 2014, 3:47 PM

Respond to this message   

Return to Index


*No $#17

by Kewbie (Login Kewbie)
R

*

Posted on Nov 9, 2014, 7:02 PM

Respond to this message   

Return to Index


found this TYPE program

by Clippy (Login burger2227)
R

Posted on Nov 11, 2014, 2:42 PM

Respond to this message   

Return to Index

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement