|
2 Dec 2004, 14:30
|
#1
|
Anal Crumb
Join Date: Apr 2000
Location: Liverpool
Posts: 1,126
|
Anyone good with vb?
Well?
__________________
(MarilynManson) Im from Scotland
|
|
|
2 Dec 2004, 14:40
|
#2
|
NEWSBOT
Join Date: Dec 2000
Location: The enby cave!
Posts: 4,872
|
Re: Anyone good with vb?
i'm sure someone is
a) wrong forum you faggot.
b) specify your needs more clearly.
__________________
[20:27:47] <nodrog-aawy> **** i think my housemate just caught me masturbating
[11:25:32] <idimmu> you are a little piggy arent you
[13:17:00] <KaneED> i'm so closet i'm like narnia
__________________
Pretty parks and funky scrap metal things here
|
|
|
2 Dec 2004, 14:42
|
#3
|
Anal Crumb
Join Date: Apr 2000
Location: Liverpool
Posts: 1,126
|
Re: Anyone good with vb?
Ive been here longer than you go and die. xx
__________________
(MarilynManson) Im from Scotland
|
|
|
2 Dec 2004, 14:54
|
#4
|
NEWSBOT
Join Date: Dec 2000
Location: The enby cave!
Posts: 4,872
|
Re: Anyone good with vb?
heh, what a retort.
shame you didnt learn how to ask questions on forums properly along the way.
__________________
[20:27:47] <nodrog-aawy> **** i think my housemate just caught me masturbating
[11:25:32] <idimmu> you are a little piggy arent you
[13:17:00] <KaneED> i'm so closet i'm like narnia
__________________
Pretty parks and funky scrap metal things here
|
|
|
2 Dec 2004, 14:57
|
#5
|
Anal Crumb
Join Date: Apr 2000
Location: Liverpool
Posts: 1,126
|
Re: Anyone good with vb?
I did. xx
__________________
(MarilynManson) Im from Scotland
|
|
|
2 Dec 2004, 15:02
|
#6
|
Henry Kelly
Join Date: Apr 2000
Posts: 7,374
|
Re: Anyone good with vb?
I used to do it years ago but I seem to remember JetLinus being good at this kind of thing.
__________________
You're now playing ketchup
|
|
|
2 Dec 2004, 15:29
|
#7
|
Godfather
Join Date: May 2000
Location: England
Posts: 5,185
|
Re: Anyone good with vb?
there was even a big link at the top of GD fs
__________________
Forum Administrator
Mail : [email protected] // IRC : #forums
__________________
It's not personal, it's just business.
|
|
|
2 Dec 2004, 18:22
|
#8
|
Rawr rawr
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
|
Re: Anyone good with vb?
I'm using VB ATM. I dislike it enormously. That's why I'm putting everything in a DLL I can write in C++.
__________________
"Yay"
|
|
|
2 Dec 2004, 19:03
|
#9
|
Wankoverable
Join Date: Apr 2002
Location: wherever I am
Posts: 726
|
Re: Anyone good with vb?
Evil school made me write connect 4 in VB last week it was evil
__________________
Don't worry, life is too long.
|
|
|
3 Dec 2004, 01:43
|
#10
|
Friendly geek of GD :-/
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
|
Re: Anyone good with vb?
I like it ;-)
And can do it. So...
__________________
[ »] Entropy increases! :-/
|
|
|
6 Dec 2004, 19:11
|
#11
|
Rawr rawr
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
|
Re: Anyone good with vb?
Today, I ran into probably the stupidest limitation of VB I encountered since I started with it:
You can't access array indices above index 32767 (2 bytes with a signed bit).
I was computing a huge array with database data, and it just gives me an "overflow" error when I access index 32767+1.
Crap VB
__________________
"Yay"
|
|
|
6 Dec 2004, 22:45
|
#12
|
Wankoverable
Join Date: Apr 2002
Location: wherever I am
Posts: 726
|
Re: Anyone good with vb?
__________________
Don't worry, life is too long.
|
|
|
7 Dec 2004, 13:12
|
#13
|
Commander
Join Date: Sep 2001
Location: Netherlands
Posts: 146
|
Re: Anyone good with vb?
Quote:
Originally Posted by Structural Integrity
Today, I ran into probably the stupidest limitation of VB I encountered since I started with it:
You can't access array indices above index 32767 (2 bytes with a signed bit).
I was computing a huge array with database data, and it just gives me an "overflow" error when I access index 32767+1.
Crap VB
|
That's because you dimmed it as Integer, dim it as Long
__________________
Quote:
Originally posted by Cochese
Cathaar are not overpowered.
You were just "bashed", live with it.
|
|
|
|
7 Dec 2004, 17:21
|
#14
|
Rawr rawr
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
|
Re: Anyone good with vb?
Quote:
Originally Posted by Caesar2
That's because you dimmed it as Integer, dim it as Long
|
What, the array? Or the counter? Both are a defined as a long. I checked and rechecked it several times.
Where does this "Dim" stuff come from BTW? Does it stand for something?
__________________
"Yay"
|
|
|
7 Dec 2004, 17:32
|
#15
|
Commander
Join Date: Sep 2001
Location: Netherlands
Posts: 146
|
Re: Anyone good with vb?
Code:
Dim i As Long
Dim myArray(35000) As Integer
For i = 1 To UBound(myArray)
myArray(i) = i
Next
Will crash your program
Code:
Dim i As Long
Dim myArray(35000) As Long
For i = 1 To UBound(myArray)
myArray(i) = i
Next
won't.
You say that you dimed both as long. It's strange that it crashes, can you post the code?
Google told me that dim means either DIMension or Damnit I Meant .
__________________
Quote:
Originally posted by Cochese
Cathaar are not overpowered.
You were just "bashed", live with it.
|
|
|
|
8 Dec 2004, 00:32
|
#16
|
Friendly geek of GD :-/
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
|
Re: Anyone good with vb?
Dimension, thats right.
What about (dodn't try)
Code:
Const MAXVAL As Long = 60000
Dim MyArray(1 to MAXVAL) as Long
Or, you could try to use:
Code:
' Just go 2-dimensional, hope that works...
Dim MyArray(1 to &H8000, 1 to &H8000) as Long
' then, everytime you wanna call it:
' Use a bitmask to get bits 30 down to 16 for the 1st index, and 15 to 1 for the 2nd. Didn't test it
Value = MyArray(LongIndex And &H40000000, LongIndex and &H8000)
__________________
[ »] Entropy increases! :-/
|
|
|
8 Dec 2004, 00:42
|
#17
|
Friendly geek of GD :-/
Join Date: Nov 2000
Location: On my metal roid
Posts: 923
|
Re: Anyone good with vb?
I just thought about another way:
Code:
' Fake it using a function
Type typBigArray
Content(0 to &H8000) as Long
End Type
Function FakeArray(Index as Long) as Long
Static MyData(0 to &H8000) as typBigArray
FakeArray = MyData(Index And &H40000000).Content(Index And &H8000)
End Function
' You could use this baby just like this:
SomeValue = FakeArray(2345346378)
' Note: Check Array boundaries, I'm not sure about starting with 0 or 1.
' And make sure the bit-operations work well with the sign-bit
' Also note: This example uses wayyyyyy much memory to run like this
Basically I tried to split the array in two sub-arrays.
It might be enough, if you had something like Static MyData(0 to 7) as typBigArray, giving you 2 ^ (3 + 15) items...
You would then access the items by:
MyData(Index \ &H8000).Content(Index Mod &H8000)
Someone would need to check all that Mod, integer division and bitmask operations.
But I think the idea gets through, no? I'm pretty sure, this code is bullshit mostly, and some mods and Ands are defenitely wrong in order or something...
__________________
[ »] Entropy increases! :-/
|
|
|
|
All times are GMT +1. The time now is 03:12.
| |