Allo! Allo! Testing the new mailing list! Does it work?
I think RapidQ should have the QB LSET and RSET instruction that helped
a lot to format strings, and incidentally
allowed to simulate Pascal's conditional UDT'S.
What do you think?
Antoni
Chris,
How about using the module(s) as an "include" to the CGI program?
This way the data would get passed and run without temp files or large
parameters that could be troublesome if being run by many web browsers
hitting the server. Of course, the down side is that you need these modules
at compile time, and can't have them implemented on the fly as they are
created. Is this a controlled situation where you can take created modules
and include them (recompile) as of a certain point in time, instead of
realtime addons?
Just a thought...
Regards,
Scott
Thanks for the ideas!
I like the idea about the pointer... I'll probably save that one for
use in an app someday. Unfortunately, I don't think its the right
thing for the design I'm working on in this instance.
Yes, I'm working CGI under linux, but I'm writing the code to be 100%
portable and plan on compiling it under linux and windows... which
adds another twist to this whole thing! The other twist that I'm
thinking about are the plug-in modules... I'd like to allow other
people to write modules in whatever language they use... the only
requirement is that it meets the specs determined by my app... but, if
the only way to do it RIGHT is to make RapidQ part of that spec, then
that is Ok.
How about a communication "pipe" using STDIN/STDOUT between the two
apps? That could be easy to do, as long as it doesn't interfere with
the STDOUT that the webserver is watching for the CGI output. Can
independant pipes be created? I think so, but I'm not sure.
If I had any sort of communication pipe, I could impliment a little
protocol for communications... easy stuff!
I also thought about doing it with TCP/UDP, but that isn't very
feasible.
Memorystream object?
Brainstorm, brainstorm, brainstorm...
Regards
--Chris
> On Fri, 19 May 2000, Christopher Bradford wrote:
>
> > I'm trying to come up with a good method that allows the main
program
> > to pass data (text) to the modules, and the modules to pass data
> > (text) back. Seems simple, except the simple methods are out of
the
> > question: command line parameters won't work because there could
> > potentially be 10-100k worth of text being swapped between the two
> > apps.
> >
> > The main app calls a "shell" statement to the module, and waits
for
> > it's execution to stop before continuing... and then continues on
with
> > the data that was passed back.
>
> Hmmm, I kind of assume you are working with the Linux version?
> With Windows, you can just use the Clipboard component.
> I haven't tried this method yet, but how about sending a pointer to
a
> string?
>
> Ptr& = VARPTR(mystring$)
> SHELL "prog "+STR$(Ptr&)
>
> Then in your shelled program, you can decode it:
>
> mystring$ = VARPTR$(val(command$(1)))
>
> Or something like that...
> Passing back might be a problem though, since mystring$ in the
shelled
> program may have a different address. I guess in this case, you'll
> have to store the new address in a file and read it.
>
> > Another catch is that this is CGI, which means there can be
multiple
> > instances of these programs running at the same time... efficiency
is
> > also an issue, so methods that utilize temp. files may not be the
best
> > idea.
>
> Assuming the memory isn't cleaned, the VARPTR idea should work...
> then again I've never tried this method.
>
> +--------------------------------+ __
> | E-mail: voxel@... |___| \_____________________
> | http://www.basicguru.com/abc/ | | o o o o o o o o o |__\_
> +--------------------------------+ +_________________________)
>
>
>
>
----------------------------------------------------------------------
--
> Remember four years of good friends, bad clothes, explosive
chemistry
> experiments.
> http://click.egroups.com/1/4051/6/_/_/_/958766843/
>
----------------------------------------------------------------------
--
>
> To unsubscribe from this group, send an email to:
> rapidq-unsubscribe@egroups.com
>
>
>
>
On Fri, 19 May 2000, Christopher Bradford wrote:
> I'm trying to come up with a good method that allows the main program
> to pass data (text) to the modules, and the modules to pass data
> (text) back. Seems simple, except the simple methods are out of the
> question: command line parameters won't work because there could
> potentially be 10-100k worth of text being swapped between the two
> apps.
>
> The main app calls a "shell" statement to the module, and waits for
> it's execution to stop before continuing... and then continues on with
> the data that was passed back.
Hmmm, I kind of assume you are working with the Linux version?
With Windows, you can just use the Clipboard component.
I haven't tried this method yet, but how about sending a pointer to a
string?
Ptr& = VARPTR(mystring$)
SHELL "prog "+STR$(Ptr&)
Then in your shelled program, you can decode it:
mystring$ = VARPTR$(val(command$(1)))
Or something like that...
Passing back might be a problem though, since mystring$ in the shelled
program may have a different address. I guess in this case, you'll
have to store the new address in a file and read it.
> Another catch is that this is CGI, which means there can be multiple
> instances of these programs running at the same time... efficiency is
> also an issue, so methods that utilize temp. files may not be the best
> idea.
Assuming the memory isn't cleaned, the VARPTR idea should work...
then again I've never tried this method.
+--------------------------------+ __
| E-mail: voxel@... |___| \_____________________
| http://www.basicguru.com/abc/ | | o o o o o o o o o |__\_
+--------------------------------+ +_________________________)
Just my two cents worth - Forget about arrays within
UDTs until some time down the road(if ever). I have
never found static arrays within UDTs to be of very
much use personally, but maybe the games programmers
do? My experience has been on business systems, and
databases and it makes file and record management much
simpler if the UDTs themselves are arrays. FWIW, table
design and management in sql databases don't allow
them anyway.
> > Off topic, yet on: When might arraying whole
> UDT's (as opposed to the
> > individual elements) be implemented?
>
> Hmmm, this has been requested a few times, it's the
> whole array thing
> within UDTs that get me. If I leave that part out,
> then having arrays of
> UDTs is no problem... I just need some time to think
> about this.
> I think if no one really cares about the arrays
> within UDTs, then I can
> go to work, or maybe I can just provide another
> "TYPE", named NEWTYPE or
> something like that :)
>
> +--------------------------------+ __
> | E-mail: voxel@... |___|
> \_____________________
> | http://www.basicguru.com/abc/ | | o o o o o o
> o o o |__\_
> +--------------------------------+
> +_________________________)
>
>
>
>
------------------------------------------------------------------------
> Make new friends, find the old at Classmates.com:
> http://click.egroups.com/1/4052/6/_/_/_/958696427/
>
------------------------------------------------------------------------
>
> To unsubscribe from this group, send an email to:
> rapidq-unsubscribe@egroups.com
>
>
>
>
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
Hi all --
I'm writing a CGI app that can call external "modules"... these
external modules are other executibles that return data to the main
program. Simple idea -- its the ability to have configurable
"plug-ins" to an application.
I'm trying to come up with a good method that allows the main program
to pass data (text) to the modules, and the modules to pass data
(text) back. Seems simple, except the simple methods are out of the
question: command line parameters won't work because there could
potentially be 10-100k worth of text being swapped between the two
apps.
The main app calls a "shell" statement to the module, and waits for
it's execution to stop before continuing... and then continues on with
the data that was passed back.
Another catch is that this is CGI, which means there can be multiple
instances of these programs running at the same time... efficiency is
also an issue, so methods that utilize temp. files may not be the best
idea.
Anybody have any good ideas?
Regards
--Chris Bradford
I think the way UDT's are in RapidQ now is:
TYPE UDTInventoryRecord
Name(1000) AS STRING * 25
Id(1000) AS INTEGER
QOH(1000) AS INTEGER
ReorderPt(1000) AS INTEGER
END TYPE
DIM Product as UDTInventoryRecord
Which you would then use as:
Product.Name(Index)
Product.Id(Index)
Product.QOH(Index)
Product.ReorderPt(Index)
For which one might as well just skip dimming the type and dim the 4 arrays,
which, as far as I can tell, would have the same function, unless one can:
Dim Product(100) as UDTInventoryRecord
and do:
Product(Index1).Name(Index2)
But Mr Yu has stated that he hasn't implemented the "Product(1000) as
UDTInventoryRecord" yet.
I would REALLY like to be able to do:
Array1(100) as QRect
Array2(50) as QRect
Which would make a lot of my coding easier. If it is as I think it is, If I
wanted to have an array of 100 Qrect's and an array of 50 Qrects, I'd have
to define two qrect types:
TYPE QRect50
Top(50) AS INTEGER
Left(50) AS STRING
Right(50) AS INTEGER
Bottom(50) AS INTEGER
END TYPE
TYPE QRect100
Top(100) AS INTEGER
Left(100) AS STRING
Right(100) AS INTEGER
Bottom(100) AS INTEGER
END TYPE
/* Hey I just copied the above from the QRECT Component section in the
documentation. Is Left really supposed to be "AS STRING"? */
I am, of course, trying to code a game. I've been trying to figure out a
way to determine whether or not an object in my game is/did intersect with
another object. (Most commonly the player's character and a wall) I did
have everything in 32x32 pixel chunks (including scrolling). Since I want
to be able to scroll smoothly, I am now working on a pixel by pixel scale.
Now a wall that used to take up 1x1 now takes up 32x32. So I figure I can
use arrays of QRects to compare intersections of different objects in my
game. And that is why I am interested in UDT's.
Suggestions are welcomed and if I'm wrong on any points please tell me!
Thanks
Bryce
----- Original Message -----
From: Daniel Foote <d_foote@...>
To: <rapidq@egroups.com>
> When William says about arrays in UDT's, what exactly do you mean? I
> would like to see arrays of UDT's as well - they make simple
> databases so easy. Anyway, by saying arrays for UDT's do you mean
> like this:
[snip]
> Is this what you mean? Probably not. I wouldn't see a need for it,
> but I suppose somebody could think of one?
How about like this:
TYPE CharacterType
Name AS STRING * 20
Strength AS BYTE
Dexterity AS BYTE
Intelligence AS BYTE
Weapon AS BYTE
Armor AS BYTE
END TYPE
TYPE WeaponType
Name AS STRING * 20
Damage AS BYTE
Cost AS BYTE
END TYPE
TYPE ArmorType
Name AS STRING * 20
Protection AS BYTE
Cost AS BYTE
END TYPE
DIM AdventurePartyMember(6) AS CharacterType
DIM Weaponry(255) AS WeaponType
DIM Armory(255) AS ArmorType
' misc. code to flesh out game.......
IF Weaponry(AdventurePartyMember(CurrentFighter).Weapon).Damage >
MonsterHide THEN
MonsterHealth = MonsterHealth -
AdventurePartyMember(CurrentFighter).Strength
END IF
> How are you accomplishing your scrolling?
Every time the QDXTimerTimer expires, I change the position of everything
that will move(by 1 pixel), then redraw the screen and flip it. (Suggestions
are welcomed :) )
>> Is there a way to .draw an image rotated, say...90 degrees?
>You'll have to do this manually... I had planned on including such a
>function, but haven't got there yet.
How can this be manually done relatively quickly with an image from a
QDXImageList? It's no problem just having an image for each direction in
the .dxg for now, but I'd like to be able to make this as small as possible
for distribution purposes.
New Questions:
Can one have more than one QDXScreen per form? With say the 2nd one's
visible set to false?
Can one .CopyRect from a QDXScreen? (I havn't gotten that far yet)
What are the fine differences between KeyDown and KeyPress? Is it that
KeyDown will only happen once, no matter how long the key is held down,
while KeyPress continues to happen? And is there any interval between
happenstances of KeyPress? I notice if I hold down the right arrow key,
then I get an immediate responce, then a pause, then a regular repitition of
"rights." Is there any way to go directly to the repitition part?
Thanks
Bryce
Hello all!
When William says about arrays in UDT's, what exactly do you mean? I
would like to see arrays of UDT's as well - they make simple
databases so easy. Anyway, by saying arrays for UDT's do you mean
like this:
TYPE TwoUDT
TEST3 AS STRING
TEST4 AS INTEGER
END TYPE
TYPE OneUDT
TEST AS STRING
TEST2 AS INTEGER
TEST5 AS TwoUDT
END TYPE
DIM OneUDT(1000) AS [whatever]
Is this what you mean? Probably not. I wouldn't see a need for it,
but I suppose somebody could think of one?
Daniel.
On Thu, 18 May 2000, Phoenix Magus wrote:
> When exactly does the DXTimer expire?
You can specify an Interval, so 1000 = 1 second, etc...
ie. DXTimer.Interval = 1000
> I'm trying to make this game i'm working on scroll smoothly, but when I
> make it smoothly, it's slower. For example, if I have the character
> move 4 pixels at a time, it goes quick enough, but the screen scrolls
> roughly. If I have the character move 4 pixels, but show it moving one
> pixel at a time, it smooth, but painfully slow. Can I make it go any
> faster?
How are you accomplishing your scrolling?
> Is there a way to .draw an image rotated, say...90 degrees?
You'll have to do this manually... I had planned on including such a
function, but haven't got there yet.
> Off topic, yet on: When might arraying whole UDT's (as opposed to the
> individual elements) be implemented?
Hmmm, this has been requested a few times, it's the whole array thing
within UDTs that get me. If I leave that part out, then having arrays of
UDTs is no problem... I just need some time to think about this.
I think if no one really cares about the arrays within UDTs, then I can
go to work, or maybe I can just provide another "TYPE", named NEWTYPE or
something like that :)
+--------------------------------+ __
| E-mail: voxel@... |___| \_____________________
| http://www.basicguru.com/abc/ | | o o o o o o o o o |__\_
+--------------------------------+ +_________________________)
On Thu, 18 May 2000, Ruben Baumann wrote:
> There is NO C:\MYSQL\LIB\OPT directory. The only file I found any
> where close was C:\MYSQL\LIB\cygwinb19.dll. I tried copying it to my
> system dir and renaming it, but it didn't work.
Hmmm, that's strange, it should be in OPT or DEBUG. Its been a while
since my last install, so I don't remember if there were any options in
installing these libraries. In any event, I decided to include a copy of
libmysql.dll on the Rapid-Q homepage just in case.
You can download it there. Have fun!
+--------------------------------+ __
| E-mail: voxel@... |___| \_____________________
| http://www.basicguru.com/abc/ | | o o o o o o o o o |__\_
+--------------------------------+ +_________________________)
Hey William,
I was going to play around with MySql, so I downloaded the Win32
shareware version, installed it, etc. However, when I went to copy
LIBMYSQL.DLL per your ReadMe to my C:\WINDOWS\SYSTEM directory, I
couldn't find the file in any of the directories created by the MySql
install process.
There is NO C:\MYSQL\LIB\OPT directory. The only file I found any
where close was C:\MYSQL\LIB\cygwinb19.dll. I tried copying it to my
system dir and renaming it, but it didn't work.
I get the following error message:
The SQL.EXE file is linked to missing export LIBMYSQL.DLL:mysql-query
Any ideas? The version of MySql is 3.22.
RapidQ is a fine piece of work BTW. I've played with it and it's
pretty easy to write in. My area of experience is with VB, Access,
and a proprietary subset of Basic called CADOL.
Keep up the good work.
RC
I've been working on my Beginning Beginner's website: the BASICs.
I have two seperate redirects for the site, the original
http://go.to/thebasics
and a new one
http://thebasics.cjb.net
I have added the cjb.net redirect because of some of the features they
offer, one of which is a java-script chat room directly off the web page so
no IRC client is needed. I don't know if there are enough Rapid-Q'ers on
the same time zone together to really need an immediate chat area at this
point, but it's there if we happen to stumble across each other. :)
Any feedback on the BASICs website would be appreciated.
When exactly does the DXTimer expire?
I'm trying to make this game i'm working on scroll smoothly, but when I make
it smoothly, it's slower. For example, if I have the character move 4
pixels at a time, it goes quick enough, but the screen scrolls roughly. If
I have the character move 4 pixels, but show it moving one pixel at a time,
it smooth, but painfully slow. Can I make it go any faster?
Is there a way to .draw an image rotated, say...90 degrees?
Off topic, yet on: When might arraying whole UDT's (as opposed to the
individual elements) be implemented?
Thanks
Phoenix Magus
What's New for Build 05.17.2000
-----------------------------------------------------------------
- Added new FIELD$ keyword
- Fixed a little problem with using DWORD in a UDT
- Added SIZEOF keyword
- Added $ESCAPECHARS to use strings with escape sequences
- Added integer division using \ (backslash)
- Added THIS keyword for extended types
- Fixed problem with GetBMP in QImageList, overlapping images.
Rapid-Q homepage: http://www.basicguru.com/abc/rapidq/
Regards,
William Yu
On Wed, 17 May 2000, Steven Edwards wrote:
> This may be a bug, or it may be me overlooking something.
> I have a set of .bmp files, all 40 x 40 and 256 colors.
> Each bmp file is a small 3 or 4 color drawing on a solid white background.
> Here is the following "test" code, ignore the commented (') lines for now:
Thanks for the report, I've fixed the problem for the next release.
Hopefully by tomorrow or later today, I'll release this new version.
+--------------------------------+ __
| E-mail: voxel@... |___| \_____________________
| http://www.basicguru.com/abc/ | | o o o o o o o o o |__\_
+--------------------------------+ +_________________________)
This may be a bug, or it may be me overlooking something.
I have a set of .bmp files, all 40 x 40 and 256 colors.
Each bmp file is a small 3 or 4 color drawing on a solid white background.
Here is the following "test" code, ignore the commented (') lines for now:
$typecheck on
$include "rapidq.inc"
$resource BMP_A as "a.bmp"
$resource BMP_B as "b.bmp"
$resource BMP_C as "c.bmp"
$resource BMP_D as "d.bmp"
' $resource BMP_BLANK as "blank.bmp"
create GameImages as qimagelist
width = 40
height = 40
addBMPhandle BMP_A, clWhite
addBMPhandle BMP_B, clWhite
addBMPhandle BMP_C, clWhite
addBMPhandle BMP_D, clWhite
' addBMPhandle BMP_BLANK, clWhite
end create
create form as qform
create image as qimage
bmp = GameImages.getbmp(0)
end create
end create
form.showmodal
When the form is displayed, the (0) image is displayed over the top of the
final image in the qimagelist. The image to be displayed can be any in the
list and the number of images in the list doesn't matter. The getbmp image
is always superimposed over the top of the last image in the list.
A quick workaround is to load a completely white (no foreground drawing) bmp
file at the end of the list: The commented lines.
On Tue, 16 May 2000, Darryl Morgendorffer wrote:
> 1.) Is there any way to implement a linked list or something comparable to
> a Java vector under Rapid-Q? (i.e. an indefinite array) I know under C++
> you need pointers to structs to implement the list, and in Java the Vector
> class would do the trick.
Sort of, but not really... here's what I mean:
TYPE MyStruct
Num AS INTEGER
Str AS STRING*255
END TYPE
DIM M AS MyStruct
DIM Mem AS QMEMORYSTREAM
M.Num = 1
Mem.WriteUDT(M)
M.Num = 2
Mem.WriteUDT(M)
Mem.Position = SIZEOF(M) '-- kind of like indexing to the second M
Mem.ReadUDT(M)
That's kind of what's involved, it's obviously not a true linked list,
but you can probably create a QLINKLIST object...
Oh yes, I don't think SIZEOF is implemented in the May 6 release, I'll
have to upload the new version later.
> 2.) Speaking of pointers, are there any plans to implement them in Rapid-Q
> for other data types besides functions? I for one would like to see them.
It's kind of like using QMEMORYSTREAM, except for a few differences of
course. Except if you use Linux/Unix, I haven't implemented QMEMORYSTREAM
yet.
> Anyways, Rapid-Q looks like a well-done program and I plan on using it
> for a few projects. Keep up the good work. :)
Thanks, I hope you enjoy using it!
+--------------------------------+ __
| E-mail: voxel@... |___| \_____________________
| http://www.basicguru.com/abc/ | | o o o o o o o o o |__\_
+--------------------------------+ +_________________________)
Hello,
I have a couple of questions:
1.) Is there any way to implement a linked list or something comparable to
a Java vector under Rapid-Q? (i.e. an indefinite array) I know under C++
you need pointers to structs to implement the list, and in Java the Vector
class would do the trick.
2.) Speaking of pointers, are there any plans to implement them in Rapid-Q
for other data types besides functions? I for one would like to see them.
Anyways, Rapid-Q looks like a well-done program and I plan on using it
for a few projects. Keep up the good work. :)
---
David Timmons
<dtimmons@...>
On Mon, 15 May 2000, Steven Edwards wrote:
> ...or maybe a mis-assumption?
>
> This relates to the division operators / and \.
> These are noramlly floating point "/" and integer "\" division operators,
> but I'm getting a floating point result from both.
Ah yes, I decided to leave it out since it is ambigous. It's not a
problem putting it back in, I'll probably do that for the next release.
If there are any objections, let me know.
+--------------------------------+ __
| E-mail: voxel@... |___| \_____________________
| http://www.basicguru.com/abc/ | | o o o o o o o o o |__\_
+--------------------------------+ +_________________________)
...or maybe a mis-assumption?
This relates to the division operators / and \.
These are noramlly floating point "/" and integer "\" division operators,
but I'm getting a floating point result from both.
Example:
PRINT 15 / 4
PRINT 15 \ 4
returns:
3.75000000
3.75000000
Shouldn't 15 \ 4 return an integer-based value of 3 ?
From: Phoenix Magus <phoenixm@...>
To: <rapidq@egroups.com>
> When creating a form, what is ClientHeight and ClientWidth. Also, what
> affect do they have on DirectX?
form.ClientHeight and form.ClientWidth let you know the exact area that can
be used to draw objects inside the form.
A form width of 200 might only have a clientwidth 0f 192.
A form height of 200 might only have a clientheight of 173.
If you make a form with width/height of 200 and try to create objects that
go all the way out to the 200 on width or height then the form will have to
be resized manually or scrolled to view all of the object(s).
I am making a test program to figure out how to use DirectX and I have a
couple questions:
When creating a form, what is ClientHeight and ClientWidth. Also, what
affect do they have on DirectX?
Is there any way to .Draw an image rotated 90 degrees? And what is the Mask
Option?
Thanks for your help!
Phoenix Magus
Enter your vote today! Check out the new poll for the rapidq
group:
We all know that Rapid-Q is great, but
just how great is it? --Echecero
(10=best, 1=worst)
o 10
o 9
o 8
o 7
o 6
o 5
o 4
o 3
o 2
o 1
To vote, please visit the following web page:
http://www.egroups.com/polls/rapidq
Note: Please do not reply to this message. Poll votes are
not collected via email. To vote, you must go to the eGroups
web site listed above.
Thanks!
Well, I hope my advice was sound and that eGroups works
out...<grin>
In any case, I'm basking in the May 6th release...Rapid-Q is
wonderful!
Thomas
Echecero@...
Welcome to the new Rapid-Q mailing list.
I apologize for the inconvenience, but since this list offers
mailing list archives, it makes my life much easier.
Please keep messages clean, and whenever possible, post your code
if you're having problems.
Thanks for using Rapid-Q!