Search found 219 matches

by RockTheSchock
Jun 16, 2015 6:38
Forum: General
Topic: Problem of access to a member of a class
Replies: 3
Views: 614

Re: Problem of access to a member of a class

Well I wrote some tests and played a bit with byref return. It seems without byref there are some allocations of p1 instances when used syntax with braces. . Remove Byref to see what I mean. type Classe_1 extends object Private: _P_1 As integer=100 public: declare Property P_1(V as integer) declare ...
by RockTheSchock
Jun 12, 2015 0:05
Forum: Tips and Tricks
Topic: Dummy Block design. Re-implementing ASM blocks ..
Replies: 5
Views: 890

Re: Dummy Block design. Re-implementing ASM blocks ..

I am wondering what exactly you want to accomplish in the long run. Do you want to write less code(chars) - use C / C++ Do you want to change FreeBasic language - modify the compiler / preprocessor Do you want to embed lua blocks just like asm blocks - just execute an external lua file. It's one lin...
by RockTheSchock
Jun 11, 2015 14:54
Forum: Libraries
Topic: PdfLib on linux
Replies: 10
Views: 1991

Re: PdfLib on linux

Well, if you dont want external dependencies just use the static version of the library. Even for GTK you can build a static version and use it for windows.
by RockTheSchock
Jun 09, 2015 15:48
Forum: Community Discussion
Topic: Dim/Data block syntax
Replies: 4
Views: 697

Re: Dim block syntax

Let me know if I missed something here. Well, you shouldn't use many global vars at all. It's cleaner to encapsulate them in a Type and define one global var/object or maybe a local var/object which you can initialise with a constrcutor and pass as parameter to your mainprocessingfunction. Such cod...
by RockTheSchock
May 28, 2015 8:47
Forum: Tips and Tricks
Topic: LUA
Replies: 1
Views: 865

Read lua table

Reading a lua table recursivly:
viewtopic.php?f=7&t=22223&hilit=+Lua#p195498
by RockTheSchock
May 28, 2015 6:08
Forum: Beginners
Topic: More than one core PC and thread*** sentences
Replies: 7
Views: 934

Re: More than one core PC and thread*** sentences

In few words and not so much exactly but enoguh to understand the question, for a chess engine, you need to give an score to possibles positions you could reach from actual and then move the piece that put the situation in the position with better score for you. Cause the amount of possible positio...
by RockTheSchock
May 27, 2015 10:31
Forum: Beginners
Topic: More than one core PC and thread*** sentences
Replies: 7
Views: 934

Re: More than one core PC and thread*** sentences

use more than one core at the same time in a some kind of parallel execution of more than one program? Please tell us what you want to do in the big picture. Has it something to do with your 1.6TB matrix? Do you want to process a large quantitiy of values? If your question is how to make execution ...
by RockTheSchock
May 27, 2015 7:19
Forum: Beginners
Topic: var-len??
Replies: 8
Views: 998

Re: var-len??

@Luis Babboni: You probably need to think about a sparse array. The principle with that is that the top 5 levels of the array are 1-dimensional arrays of pointers, and the bottom level is a 1-dimensional array of integers. Initially, only the top level array exists, and all its pointers are null. W...
by RockTheSchock
May 27, 2015 6:37
Forum: Beginners
Topic: var-len??
Replies: 8
Views: 998

Re: var-len??

Maybe you can use lua to manage your sparse arrays. You would only need to implement methods for reading / writing / loading / saving. Lua maybe uses about twice the memory as an optimised freebasic version would use, but thats better than 1.6TB Reading a lua table: http://www.freebasic.net/forum/vi...
by RockTheSchock
May 22, 2015 11:36
Forum: Community Discussion
Topic: Error in Winsock.bi
Replies: 1
Views: 588

Error in Winsock.bi

I tried EGNP/ TSNE and found some errors in winsock.bi. It seems to be a regression in preprocessor. Sizeof((t)) with 2 parenthesis doesnt work anymore: #Define _A(t) (CLng(sizeof((t))) ) Screen 0 #Print _A(ULong) Print _A(Ulong) Sleep In winsock.bi you will need to fix sizeof((t)) with sizeof(t) #d...
by RockTheSchock
May 21, 2015 14:31
Forum: Community Discussion
Topic: KolibriOS
Replies: 2
Views: 730

KolibriOS

How difficult is it, to port FBC to KolibriOS? Maybe it would be a nice platform as alternative to DOS.

http://kolibrios.org/
http://diamond.kolibrios.org/hll/hll_eng.htm

svn://kolibrios.org/programs/develop
by RockTheSchock
May 19, 2015 12:11
Forum: General
Topic: Passing pointer to member function to another class
Replies: 3
Views: 784

Re: Passing pointer to member function to another class

Use a static method add and member method add. http://forum.qbasic.at/viewtopic.php?p=106890#106890 Type MyUDT Public: Declare Static Sub SetValue(obj As MyUDT, v As Integer) Declare Sub SetValue(v As Integer) value As Integer End Type Type SubInteger As Sub(obj As MyUDT,v As Integer) Sub MyUDT.setV...
by RockTheSchock
May 18, 2015 15:47
Forum: Beginners
Topic: Can I change default initial values?
Replies: 12
Views: 1166

Re: Can I change default initial values?

Wouldn't it be enough to just issue a warning if a variable gets assigned a constant value more than once? @dkl or any other fbc developer. (I did take a brief look into fbc 1.0 sources, i am not an expert!): Just add a CONST_ASIGNMENT flag to "type ASTNODE" which is checked/set if an FBVA...
by RockTheSchock
May 16, 2015 14:39
Forum: Beginners
Topic: Can I change default initial values?
Replies: 12
Views: 1166

Re: Can I change default initial values?

Maybe you can use a variant type and overwrite the let operator. So it s possible to catch initialisation. Or you can modify the compiler let operator to issue a warning.
by RockTheSchock
May 12, 2015 20:39
Forum: Beginners
Topic: FreeBASIC variable initialization
Replies: 14
Views: 3247

Re: FreeBASIC variable initialization

FreeBasic is a statically typed language like C, Java, Pascal ... So Var and Dim are used to ensure that each variable has a type. Additionally with Dim you can define arrays. RockTheSchock, I didn't know about the VAR keyword. Now I have tried it. This is almost what I want. But the VAR keyword is ...

Go to advanced search