11-23-2005, 08:28 AM
Is there a way to do this?
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Copying Contents of an Array without Loop?
|
11-23-2005, 08:28 AM
Is there a way to do this?
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
11-23-2005, 10:23 PM
If you just need to use the same data without modifying it, then you could use a pointer.
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
11-24-2005, 12:42 AM
Code: #include "crt.bi"
11-24-2005, 01:04 AM
To clarify, Torahteen,
Quote: memcpy is included in the C runtime library, so you have to include crt.bi and compile with the crt lib. the last argument must be len(datatype) * number of subscripts So if you have the array Code: dim blarg(19) as byte you need to use len(byte) * 20 (remember the 0th subscript)
11-24-2005, 07:28 AM
bwah! i was trying to find something like that, i was thinking to myself 'isnt there a memcopy routine or something like that...' but i couldnt find it... and that explains why, heh, its c >)
11-24-2005, 08:18 AM
Yo! Syn! Hows ZGA coming :)
The newest pics of the ships are... stunning.
11-24-2005, 09:10 AM
Quote:... Code: dim array(20) as byte = index 0 to 19 = 20 bytes Or i'm wrong ? Joshy
sorry about my english
11-24-2005, 09:35 AM
Or you can use the fast MMX copy sub from the gfx library.
Joshy Code: #include "fbgfx.bi"
sorry about my english
11-24-2005, 05:03 PM
Quote: If you dimension an array using (20), it will dimension index 0 to 20, giving 21 subscripts.
11-24-2005, 05:31 PM
Exactly. In C is the way you say. That's 'cause of this:
In C: Code: int a[number-of-subscripts]; In BASIC: Code: Dim a (highest-subscript) As Integer The semantics are different.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio underBASIC, homegrown musicians [img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i |
« Next Oldest | Next Newest »
|