I have noticed an unexpected result in the #Cash column.
In example 1 I entered value -2500000,65 and it displayed as -2.500.000, 75 .
PB function works as expected: FormatNumber(-2500000.65,2,",",".") = -2.500.000,65.
I work on financial software, #Cash columns with correct outcome are helpful ...
Search found 6 matches
- Sun Jan 14, 2018 2:46 pm
- Forum: Tricks 'n' Tips
- Topic: [Module] GridExModule.pbi
- Replies: 71
- Views: 38410
- Wed Dec 28, 2011 10:49 am
- Forum: Tricks 'n' Tips
- Topic: Function pointers and arguments
- Replies: 2
- Views: 1633
Re: Function pointers and arguments
Thanks a lot, Wilbert !!!
This is what I was looking for
This is what I was looking for

- Wed Dec 28, 2011 10:20 am
- Forum: Tricks 'n' Tips
- Topic: Function pointers and arguments
- Replies: 2
- Views: 1633
Function pointers and arguments
Probably a simple question, but I do not know how to solve it:
I have this piece of code:
Prototype myProto(arg1.s, arg2)
Global myFunctionPtr.myProto
Procedure test_a(arg1.s, arg2)
Debug arg1 + " = " + Str(arg2)
EndProcedure
Procedure test_b(arg1.s, arg2)
Debug arg1 + " ==> " + Str(arg2 ...
I have this piece of code:
Prototype myProto(arg1.s, arg2)
Global myFunctionPtr.myProto
Procedure test_a(arg1.s, arg2)
Debug arg1 + " = " + Str(arg2)
EndProcedure
Procedure test_b(arg1.s, arg2)
Debug arg1 + " ==> " + Str(arg2 ...
- Sat Aug 14, 2010 6:01 pm
- Forum: Coding Questions
- Topic: Register a C Function array for LUA
- Replies: 21
- Views: 7260
Re: Register a C Function array for LUA
It depends on the function prototype: passing #null when a long integer is expected is easy.
The question that must be answered is: how do you pass #null when the function expects string (pointer to char in C) ?
I think Erin wants to replace luaL_register(ls,"EGP",EGPFuncs()) with luaL_register(ls ...
The question that must be answered is: how do you pass #null when the function expects string (pointer to char in C) ?
I think Erin wants to replace luaL_register(ls,"EGP",EGPFuncs()) with luaL_register(ls ...
- Sat Aug 14, 2010 2:35 pm
- Forum: Coding Questions
- Topic: Register a C Function array for LUA
- Replies: 21
- Views: 7260
Re: Register a C Function array for LUA
Hi Erion,
PureBasic is the challenge here, because you need to pass a nullpointer as second argument for luaL_register(). I don't know how to do this. Maybe this is impossible by design ?
But is this really slowing you down ? Take a look at the Lua source and you will notice that for each element ...
PureBasic is the challenge here, because you need to pass a nullpointer as second argument for luaL_register(). I don't know how to do this. Maybe this is impossible by design ?
But is this really slowing you down ? Take a look at the Lua source and you will notice that for each element ...
- Sat Aug 14, 2010 9:48 am
- Forum: Coding Questions
- Topic: Register a C Function array for LUA
- Replies: 21
- Views: 7260
Re: Register a C Function array for LUA
Use lua_register() to register functions in the global namespace.
Use luaL_register() to register functions in a user defined namespace (Lua table).
With a few modifications your code works fine.
Dave
IncludeFile ("lua.pbi")
;LUA State
Global ls
; The sample procedure
ProcedureC testfunc(L ...
Use luaL_register() to register functions in a user defined namespace (Lua table).
With a few modifications your code works fine.
Dave
IncludeFile ("lua.pbi")
;LUA State
Global ls
; The sample procedure
ProcedureC testfunc(L ...