Search found 711 matches

by grindstone
Apr 24, 2020 13:55
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 61
Views: 2745

Re: Parse string to tree structure (solved)

badidea wrote:But I haven't seen the birds much the last days.
Maybe they're busy with breeding.

BTW: The couple of Great Ttimice in my letterbox are breeding, too now.
by grindstone
Apr 22, 2020 12:22
Forum: Tips and Tricks
Topic: Attacking a UDT
Replies: 17
Views: 825

Re: Attacking a UDT

@UEZ: Thank you for your "silly" question (and to dodicat and fxm for their answers).
by grindstone
Apr 10, 2020 18:06
Forum: Beginners
Topic: Compile error [Solved]
Replies: 4
Views: 268

Re: Compile error

I can't reproduce that error. Code compiles and runs here (WinXP32, FB 1.05)
by grindstone
Mar 27, 2020 13:04
Forum: Community Discussion
Topic: Freebasic is not smooth in graphics
Replies: 17
Views: 1295

Re: Freebasic is not smooth in graphics

Hello nenver and welcome to the forum! Although FB has no built-in sprites, there are tools to smoothen graphics, but you have to take care of it yourself. Have a look at these keywords: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgScreengraphics https://www.freebasic.net/wiki/wikka.php?wakka...
by grindstone
Mar 26, 2020 16:17
Forum: General
Topic: Corona virus simulator
Replies: 44
Views: 2201

Re: Corona virus simulator

@dodicat: Nice work!
by grindstone
Mar 24, 2020 13:59
Forum: General
Topic: Corona virus simulator
Replies: 44
Views: 2201

Re: Corona virus simulator

Nice work!
by grindstone
Mar 24, 2020 13:42
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 61
Views: 2745

Re: Parse string to tree structure

One small issue: It does not display all items in a path before all sub-paths ("files before folders"). This can easily be fixed by a slight modification of the printTree sub: Sub printTree(tp As tDirTreeNode Ptr) Print String(tp->depth, " "); "+ "; tp->fname 'print th...
by grindstone
Mar 23, 2020 13:56
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 61
Views: 2745

Re: Parse string to tree structure

@badidea: With that "double - typing" you're making it unnecessary complicated. You can simply put it all in a single type... type tree_type dim as string path dim as string item(any) dim as tree_type ptr pChild(any) declare sub addItem(objectStr as string, sepChar as string) declare sub s...
by grindstone
Mar 22, 2020 18:28
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 61
Views: 2745

Re: Parse string to tree structure

@badidea: Great work! That reminds me that I have to clean my nesting boxes (and my letter box, too, I get this little lodger since three years). http://users.freebasic-portal.de/grindstone/Screenshots/Meise3.jpg And here are my two pennies to the tree parser: #Include "dirTree.bi" Dim As ...
by grindstone
Mar 20, 2020 16:01
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 61
Views: 2745

Re: Parse string to tree structure

In the meantime I put the tTreeNode class into a library I call "dirTree.bi": #Include Once "dir.bi" Type tDirTreeNode As String fName 'name of the current subfolder As UInteger attr 'attributes As Integer depth 'tree depth of the current folder As boolean deflate = TRUE 'deflati...
by grindstone
Mar 20, 2020 13:25
Forum: General
Topic: Parse string to tree structure (solved)
Replies: 61
Views: 2745

Re: Parse string to tree structure

Something like this ?
by grindstone
Mar 18, 2020 14:37
Forum: General
Topic: virus outbreak sim
Replies: 12
Views: 632

Re: virus outbreak sim

the dead are moving !! Maybe zombies? *grin* Tip: In FB a TYPE can contain an array of itself: type thuman dim as double x , y '' spot of thuman dim as long kl '' color state of thuman dim as integer tijd1 , tijd2 ''counter for keeping time Static As thuman human() 'humans array Declare Sub act(<op...
by grindstone
Mar 10, 2020 14:30
Forum: General
Topic: Instr()
Replies: 25
Views: 1057

Re: Instr()

I recoded my snippet to really count (instead of calculate) the number of values. Const tallylen = 256^4/8 Dim As String str1, substr, dict Dim As Integer strlen, dummy, inputcount, outputcount Dim As ULong Ptr von, bis Dim As UByte Ptr dictptr, tally = Callocate(tallylen) Open ExePath + "\inpu...
by grindstone
Mar 09, 2020 13:34
Forum: General
Topic: Instr()
Replies: 25
Views: 1057

Re: Instr()

Thank you for testing, due to it I found a bug in my code (and fixed it, see above). But very strange - our machines seem to behave quite different: 10000000 characters: instrtest11: 0.689609581455835 tally: 0.4877191733044564 20000000 characters: instrtest11: 1.343974237574243 tally: 0.678297967142...
by grindstone
Mar 08, 2020 22:32
Forum: General
Topic: Instr()
Replies: 25
Views: 1057

Re: Instr()

And now the same with assembly code. Anyone to beat this? Const tallylen = 256^4/8 Dim As String str1, substr, dict Dim As Integer strlen, dummy Dim As ULong Ptr von, bis Dim As UByte Ptr dictptr, tally = Callocate(tallylen) strlen = 10000000 'strlen = 13*1024*1024 'strlen = 12 str1 = String(strlen,...

Go to advanced search