Page 3 of 3
Re: .a and .u
Posted: Sun Jun 13, 2010 7:17 pm
by Trond
Thorium wrote:freak wrote:Nobody forces you to use that structure. You can create your own and name it whatever you want.
It would still have a .a datatype in it.
Code: Select all
Structure Ubyte
b.a
EndStructure
Procedure.i IsHooked(Module.s, Function.s)
Protected Lib.i
Protected *FuncAddr.Ubyte
Lib = OpenLibrary(#PB_Any, Module)
*FuncAddr = GetFunction(Lib, Function)
CloseLibrary(Lib)
If *FuncAddr <> 0
If *FuncAddr\b = $E9 ; B!!!!!
ProcedureReturn #True
Else
ProcedureReturn #False
EndIf
EndIf
EndProcedure
Re: .a and .u
Posted: Sun Jun 13, 2010 9:55 pm
by Thorium
Yes, and?
It still has the .a datatype in it. So i am just ending up like on C and define names for things that are all the same and make the code less portable (have to ship the structures with code snippets) and i think the logic is just bad. Ascii is logicaly not a basic data typ, it would be much more logical do call it a unsignt byte: .ub
Re: .a and .u
Posted: Mon Jun 14, 2010 1:45 am
by Fred
It's your opinion, and we respect it. Please respect our as well, it's not going to change. Ascii and Unicode as unsigned byte and word are perfectly valid and makes sens in many situation where you are dealing with characters. We won't duplicate these types to call them .ub or .uw. Now the more important is than your have these unsigned types available, so what about getting back to code ?
Re: .a and .u
Posted: Mon Jun 14, 2010 9:46 am
by Thorium
Fred wrote: Please respect our as well, it's not going to change.
I do respect it, and it's no reason for me to not use PureBasic. But as long as it's allowed to discuss it, i will. ^^
Re: .a and .u
Posted: Fri Nov 09, 2012 9:36 pm
by User_Russian
Good topic.
At the moment, not enough of Unsigned Long and Integer.
For example, to compare the two IPv4 addresses, we have to use variables such as Quad, although it is enough to Unsigned Long.
Such examples are many.
Re: .a and .u
Posted: Wed Jun 12, 2013 8:24 am
by User_Russian
The next version is planned to add unsigned variables Long and Integer?
If not, then at least add the function or macro (like Bool), which allows to compare the signed variables as unsigned. As well necessary to solve the
problem with a shift.
Re: .a and .u
Posted: Wed Jun 12, 2013 3:58 pm
by BorisTheOld
User_Russian wrote:If not, then at least add the function or macro (like Bool), which allows to compare the signed variables as unsigned. As well necessary to solve the
problem with a shift.
We get around the problem of missing features in PB by using the features of FreeBasic. We pass the data to a small FB module, do the appropriate processing, then return the results to the PB code.
The technique works well and is easy to implement.
Re: .a and .u
Posted: Tue Jun 25, 2013 11:19 am
by blueznl
Might make sense, but perhaps might not. Could you give an example of the thing you couldn't do in PureBasic?