
TailBite 1.0 Preview, soon in PureProject and PureArea
Moderators: gnozal, ABBKlaus, lexvictory
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
You mean create user defined constants ?Maxus wrote:How make
constant #KEY=0
in TailBite?
Perhaps you should consider creating a resident (the *.res files in %PB%\Residents) ?
Check the PBCompiler /RESIDENT flag.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Code: Select all
Procedure.l ipf_bbTurnEntity(e.l,p.f,y.f,r.f,_global.l=0)
ProcedureReturn bbTurnEntity_(e,p,y,r,_global)
EndProcedure
ProcedureDLL.l bbTurnEntity(e.l,p.f,y.f,r.f,_global.l)
ProcedureReturn ipf_bbTurnEntity(e,p,y,r,_global)
EndProcedure
ProcedureDLL.l bbTurnEntity2(e.l,p.f,y.f,r.f)
ProcedureReturn ipf_bbTurnEntity(e,p,y,r)
EndProcedure
Not default parameter _global
Sorry my English, I'm Russian
AMT Laboratory
AMT Laboratory
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Iirc, you can't use default values with Tailbite, but something it like this should work :
Code: Select all
ProcedureDLL.l bbTurnEntity(e.l,p.f,y.f,r.f)
ProcedureReturn ipf_bbTurnEntity(e,p,y,r, 0)
EndProcedure
ProcedureDLL.l bbTurnEntity2(e.l,p.f,y.f,r.f,_global.l)
ProcedureReturn ipf_bbTurnEntity(e,p,y,r,_global)
EndProcedure
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Since the change with optional parameters, i can only use 9 optional
parameters, but before i have used more as this, but changed the desc by
hand. I can't do this anymore
parameters, but before i have used more as this, but changed the desc by
hand. I can't do this anymore

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Did you update jaPBe V3 ?X wrote:Any chance to update to support 4.10 series? This may be either a jaPBe issue or Tailbite. However, when Tailbiting from jaPBe, it errors out with numerous errors on any code.
Tailbiting from jaPBe V3 with PB 4.10 works just fine here.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
jaPBe V3 already comes with a custom tailbite version wich is used if you select Menu:Project->Tailbite.X wrote:I have the newest jaPBe installed, but not the newest Tailbite, which must be causing the problem. I'll install the newest tailbite tonight and see if that fixes things.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
I compile this code in a userlib (Mode Normal & Unicode)
Whatelse the mode of compilation of the test file (a simple TestFunc()), that debugs 0.
Code: Select all
ProcedureDLL TestFunc()
CompilerIf #PB_Compiler_Unicode = #True
ProcedureReturn #True
CompilerElse
ProcedureReturn #False
CompilerEndIf
EndProcedure
you have to use subsystems else it will not work.
This is compiled in normal mode :
and this is compiled in unicode mode :
This is compiled in normal mode :
Code: Select all
; ProcedureDLL TestFunc()
macro MP0{
_Procedure0:
PUSH ebx
PS0=8
; CompilerIf #PB_Compiler_Unicode = #True
; ProcedureReturn #False
XOR eax,eax
JMP _EndProcedure1
; CompilerEndIf
; EndProcedure
XOR eax,eax
_EndProcedure1:
POP ebx
RET
}
_PB_EOP_NoValue:
PUSH dword 0
_PB_EOP:
CALL _PB_EndFunctions
PUSH dword [PB_MemoryBase]
CALL _HeapDestroy@4
CALL _ExitProcess@4
_PB_EndFunctions:
RET
;
Code: Select all
; ProcedureDLL TestFunc()
macro MP0{
_Procedure0:
PUSH ebx
PS0=8
; CompilerIf #PB_Compiler_Unicode = #True
; ProcedureReturn #True
MOV eax,1
JMP _EndProcedure1
; CompilerElse
; EndProcedure
XOR eax,eax
_EndProcedure1:
POP ebx
RET
}
_PB_EOP_NoValue:
PUSH dword 0
_PB_EOP:
CALL _PB_EndFunctions
PUSH dword [PB_MemoryBase]
CALL _HeapDestroy@4
CALL _ExitProcess@4
_PB_EndFunctions:
RET
;