Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Lunch Time


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Apr 15, 2004
Lunch Time


Today, I am enjoying a Tijuana turkey club and chips.

__________________
You can't polish a turd


Baaaaa.
No, really - Just Baaaaa.


Status: Offline
Posts: 1561
Date: Apr 15, 2004

About 6 hours ago I had a fried egg in a bun with brown sauce, 2 hash browns, 2 rashers of bacon, 2 sausages and baked beans - yummy!

__________________
Argh Snake.


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Apr 15, 2004

Sounds good! I'd be tempted to likewise if I were in your shoes.

__________________
You can't polish a turd


Tickle me, Elmo!

I'm Roger Moore's Stunt Double!



Status: Offline
Posts: 4936
Date: Apr 15, 2004

For lunch today I spent 45 minutes trying to explain why the good people of Index should refund my £180 for the sofa they collected from me yesterday. Tasty!

__________________
Don't you just love it?


I am the Jammie King!




Status: Offline
Posts: 12736
Date: Apr 15, 2004

Are you threaening to steal my wife's shoes?  Don't.  They won't suit you.  If I see you posting about you cross-dressing habits again, I shall have to tell you off.


(I'm soooo masterful!  Fear me!)



__________________
The King has spoken... But nobody listened.


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Apr 15, 2004

Wow, if I'm going to be reprimanded to this extent, perhaps I'd better post the following:

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
dest As Any, _
source As Any, _
ByVal bytes As Long)


Private Function ArrayDims(arr As Variant) As Long
Dim ptr As Long
Dim VType As Long
Const VT_BYREF As Long = &H4000&
CopyMemory VType, arr, 2
If Not CBool(VType And vbArray) Then Exit Function
CopyMemory ptr, ByVal VarPtr(arr) + 8, 4
If (VType And VT_BYREF) Then CopyMemory ptr, ByVal ptr, 4
If ptr Then CopyMemory ArrayDims, ByVal ptr, 2
End Function


Private Function ArrayInfo(testArr As Variant) As Variant
Dim i As Long, arrDms As Long
Dim arrMax As Long, arrMin As Long
Let arrDms = ArrayDims(testArr)
If CBool(arrDms - 1) Then
arrMin = LBound(testArr, 1)
For i = 1 To arrDms
If LBound(testArr, i) < arrMin Then arrMin = LBound(testArr, i)
If UBound(testArr, i) > arrMax Then arrMax = UBound(testArr, i)
Next
Else: arrMin = LBound(testArr): arrMax = UBound(testArr)
End If
ArrayInfo = Array(arrDms, arrMin, arrMax)
End Function


Sub foobar1()
Dim myArr() As String, myArr2 As Variant
ReDim myArr(0 To 100, 1 To 3, 4 To 7)
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
"||Minimum Element Boundary: " & myArr2(1) & _
"||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub


Sub foobar2()
Dim myArr As Variant, myArr2 As Variant
myArr = Array(1, 2, 3)
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
"||Minimum Element Boundary: " & myArr2(1) & _
"||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub


Sub foobar3()
Dim myArr() As Byte, myArr2 As Variant
myArr = StrConv("123", vbFromUnicode)
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
"||Minimum Element Boundary: " & myArr2(1) & _
"||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub


Sub foobar4()
Dim myArr As Variant, myArr2 As Variant
Let myArr = Split("1|2|3", "|")
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
"||Minimum Element Boundary: " & myArr2(1) & _
"||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub


Sub foobar5()
Dim myArr() As String, myArr2 As Variant
ReDim myArr(12 To 23, 2 To 3)
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
"||Minimum Element Boundary: " & myArr2(1) & _
"||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub




__________________
You can't polish a turd


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Apr 15, 2004

Bummer, pre tags aren't all they're cut out to be. And of the following?

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
    dest As Any, _
    source As Any, _
    ByVal bytes As Long)

Private Function ArrayDims(arr As Variant) As Long
Dim ptr As Long
Dim VType As Long
Const VT_BYREF As Long = &H4000&
CopyMemory VType, arr, 2
If Not CBool(VType And vbArray) Then Exit Function
CopyMemory ptr, ByVal VarPtr(arr) + 8, 4
If (VType And VT_BYREF) Then CopyMemory ptr, ByVal ptr, 4
If ptr Then CopyMemory ArrayDims, ByVal ptr, 2
End Function

Private Function ArrayInfo(testArr As Variant) As Variant
Dim i As Long, arrDms As Long
Dim arrMax As Long, arrMin As Long
Let arrDms = ArrayDims(testArr)
If CBool(arrDms - 1) Then
    arrMin = LBound(testArr, 1)
    For i = 1 To arrDms
        If LBound(testArr, i) arrMax Then arrMax = UBound(testArr, i)
    Next
Else: arrMin = LBound(testArr): arrMax = UBound(testArr)
End If
ArrayInfo = Array(arrDms, arrMin, arrMax)
End Function

Sub foobar1()
Dim myArr() As String, myArr2 As Variant
ReDim myArr(0 To 100, 1 To 3, 4 To 7)
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
    "||Minimum Element Boundary: " & myArr2(1) & _
    "||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub

Sub foobar2()
Dim myArr As Variant, myArr2 As Variant
myArr = Array(1, 2, 3)
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
    "||Minimum Element Boundary: " & myArr2(1) & _
    "||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub

Sub foobar3()
Dim myArr() As Byte, myArr2 As Variant
myArr = StrConv("123", vbFromUnicode)
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
    "||Minimum Element Boundary: " & myArr2(1) & _
    "||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub

Sub foobar4()
Dim myArr As Variant, myArr2 As Variant
Let myArr = Split("1|2|3", "|")
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
    "||Minimum Element Boundary: " & myArr2(1) & _
    "||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub

Sub foobar5()
Dim myArr() As String, myArr2 As Variant
ReDim myArr(12 To 23, 2 To 3)
myArr2 = ArrayInfo(myArr)
MsgBox Replace("Array Dimensions: " & myArr2(0) & _
    "||Minimum Element Boundary: " & myArr2(1) & _
    "||Maximum Element Boundary: " & myArr2(2), "|", vbLf)
End Sub




__________________
You can't polish a turd


Tickle me, Elmo!

I'm Roger Moore's Stunt Double!



Status: Offline
Posts: 4936
Date: Apr 15, 2004

That'll show him, yeah!

__________________
Don't you just love it?


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Apr 15, 2004

I think that's how you're supposed to respond when you get your bottom paddled in certain circles.

__________________
You can't polish a turd


I am the Jammie King!




Status: Offline
Posts: 12736
Date: Apr 15, 2004

Just don't do it again or I'll CODE your @ss!

__________________
The King has spoken... But nobody listened.
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard