replace Tailbite, can be a solution?

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

replace Tailbite, can be a solution?

Post by dobro »

currently, we can compile a Libraire in DLL as well

Code: Select all


; Code "operations.dll "  a compiler en DLL
; Ces fonctions , une fois compilées en DLL ne seront pas visible par l'utilisateur (comme pour une User_lib)
ProcedureDLL Add(a,b)
      ProcedureReturn a+b
EndProcedure
ProcedureDLL sous(a,b)
      ProcedureReturn a-b
EndProcedure
ProcedureDLL div(a,b)
      ProcedureReturn a/b
EndProcedure
ProcedureDLL Mul(a,b)
      ProcedureReturn a*b
EndProcedure

PureBasic has created a "* .lib" file ("operations.lib" for my example)

it is necessary, in our listing, to use our functions, do this

Code: Select all




Import "operations.lib"
; Liste des fonctions presentes dans la DLL
      add(a,b)
      sous(a,b)
      div(a,b)
      Mul(a,b)
EndImport

; Utilisation
debug add(5,8)
debug Sous(8,2)
debug div(10,8)
debug Mul(5,8)

the problem is that in order to access our functions, we must have in the code that uses them, at the beginning of it, This :

Code: Select all

 Import "operations.lib"
; Liste des fonctions presentes dans la DLL
      add(a,b)
      sous(a,b)
      div(a,b)
      Mul(a,b)
EndImport


it just misses Purebasic the possibility to automatically insert this import, to benefit from the same advantages as TailBite
!!!!

If, at the time of compilation, the imports
could be inserted, we would have the same advantage as with Tailbite !

feasible or not feasible ?? :shock: :)
Last edited by dobro on Thu Sep 07, 2017 2:38 pm, edited 1 time in total.
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
User avatar
falsam
Enthusiast
Enthusiast
Posts: 630
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: replace Tailbite, can be a solution?

Post by falsam »


➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect.
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Re: replace Tailbite, can be a solution?

Post by dobro »

Arf, I had not seen
the repetition of this subject, may make things happen :lol:
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
Post Reply