TailBite 1.0 Preview, soon in PureProject and PureArea

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

:)
I may look like a mule, but I'm not a complete ass.
User avatar
Maxus
User
User
Posts: 71
Joined: Thu Feb 16, 2006 9:35 am
Location: Russia
Contact:

Post by Maxus »

How make
constant #KEY=0
in TailBite?
Sorry my English, I'm Russian
AMT Laboratory
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Maxus wrote:How make
constant #KEY=0
in TailBite?
You mean create user defined constants ?
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).
User avatar
Maxus
User
User
Posts: 71
Joined: Thu Feb 16, 2006 9:35 am
Location: Russia
Contact:

Post by Maxus »

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
This code not work.
Not default parameter _global
Sorry my English, I'm Russian
AMT Laboratory
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

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).
User avatar
Maxus
User
User
Posts: 71
Joined: Thu Feb 16, 2006 9:35 am
Location: Russia
Contact:

Post by Maxus »

Thank you!!!
Sorry my English, I'm Russian
AMT Laboratory
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

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 :cry:
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.
Image
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Post by X »

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.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I may look like a mule, but I'm not a complete ass.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

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.
Did you update jaPBe V3 ?
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).
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Post by X »

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.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

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.
jaPBe V3 already comes with a custom tailbite version wich is used if you select Menu:Project->Tailbite.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

I compile this code in a userlib (Mode Normal & Unicode)

Code: Select all

ProcedureDLL TestFunc()
  CompilerIf #PB_Compiler_Unicode = #True
    ProcedureReturn #True
  CompilerElse
    ProcedureReturn #False
  CompilerEndIf
EndProcedure
Whatelse the mode of compilation of the test file (a simple TestFunc()), that debugs 0.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

you have to use subsystems else it will not work.

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
; 
and this is compiled in unicode mode :

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
; 
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

I use the tailbitation (*new word :-p) and so subsystems !

but the compilerif doesn't run !
Post Reply