It is currently Mon Apr 06, 2020 9:54 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Meaning of ImportC without a library file name
PostPosted: Wed Mar 25, 2020 8:23 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon May 29, 2006 11:29 am
Posts: 332
Location: BARCELONA - SPAIN
Code:
  ImportC ""
    gmtime(*timer)
    localtime(*timer)
    setlocale(category, locale.p-UTF8)
    strftime(*s, maxsize, format.p-UTF8, *timeptr)
  EndImport


I have seen this piece of code that I do not understand why it works, although it works correctly.
According to the Purebasic help file, a library file name is required from which to import the functions it contains.
In this case, the Library file name does not exist, but the declared functions are available and can be used within the program.
Can someone explain to me why a library file name is not essential in this code?
Thank you

_________________
QuimV


Top
 Profile  
Reply with quote  
 Post subject: Re: Meaning of ImportC without a library file name
PostPosted: Wed Mar 25, 2020 8:24 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14016
Location: France
It uses functions of the libc which is always linked with the PureBasic exe, so you don't have to put something in.


Top
 Profile  
Reply with quote  
 Post subject: Re: Meaning of ImportC without a library file name
PostPosted: Wed Mar 25, 2020 8:26 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon May 29, 2006 11:29 am
Posts: 332
Location: BARCELONA - SPAIN
:D I understand now!
Where can I find a list of the functions contained in the "libc" library?
Thanks in advanced

_________________
QuimV


Top
 Profile  
Reply with quote  
 Post subject: Re: Meaning of ImportC without a library file name
PostPosted: Thu Mar 26, 2020 3:27 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Nov 22, 2011 5:11 pm
Posts: 299
Location: Kelowna, BC, Canada
Not all libc libraries are created equal, see here:

https://en.wikipedia.org/wiki/C_standard_library

_________________
PB 5.71 on Windows 10 & OS X High Sierra


Top
 Profile  
Reply with quote  
 Post subject: Re: Meaning of ImportC without a library file name
PostPosted: Thu Mar 26, 2020 7:37 am 
Offline
Enthusiast
Enthusiast

Joined: Mon May 29, 2006 11:29 am
Posts: 332
Location: BARCELONA - SPAIN
:D OK, Thank you very much to all

_________________
QuimV


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Columbo and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye