Ooops
January 19, 2021, 06:00:41 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Miscellaneous
»
[bb] Delete similar types by Shambler [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] Delete similar types by Shambler [ 1+ years ago ] (Read 451 times)
BlitzBot
Jr. Member
Posts: 1
[bb] Delete similar types by Shambler [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:41 AM »
Title :
Delete similar types
Author :
Shambler
Posted :
1+ years ago
Description :
Deletes type 'copies' leaving a unique set of types that all have different values.
Code :
Code: BlitzBasic
Type
mytype
Field
xfactor
End Type
somany=
1000
For
some=
1
To
somany
m.mytype=
New
mytype
mxfactor=
Rnd
(
100
)
Next
For
m.mytype=
Each
mytype
Print
mxfactor
Next
start=
MilliSecs
(
)
For
a.mytype=
Each
mytype
For
b.mytype=
Each
mytype
If
Handle
(
a
)
<>Handle
(
b
)
If
axfactor=bxfactor
Delete
b
EndIf
EndIf
Next
Next
time=
MilliSecs
(
)
-start
For
m.mytype=
Each
mytype
Print
mxfactor
Next
Print
"Search took "
+time+
" millisecs for "
+somany+
" types"
While
Not
KeyHit
(
1
)
Wend
Comments :
none...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Miscellaneous
»
[bb] Delete similar types by Shambler [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal