difference between USES and INCLUDE

In this category you can exchange your programming questions and solutions.
Post Reply
PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

difference between USES and INCLUDE

Post: # 114Post PaPi
Tue Jul 10, 2007 8:18 pm

Hi, I don`t see the difference between the commands USES and INCLUDE.
I wish the difference how to do it, bat which one can I have in practice, and why?

best regards
PaPi


wellnounpun
Posts: 5
Joined: Tue Nov 08, 2005 3:00 pm

difference between USES and INCLUDE

Post: # 115Post wellnounpun
Thu Jul 19, 2007 6:07 pm

Uses is for lib files, Include is for normal source files.

PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

difference between USES and INCLUDE

Post: # 116Post PaPi
Fri Jul 20, 2007 6:34 am

Yes, Marco, bat
1. I should  say  not: both contains basic code (see:led.lib!)
2. I can`t wish the correct location of both commands in the source code

best regards
PaPi

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

difference between USES and INCLUDE

Post: # 117Post Marco
Mon Jul 23, 2007 3:50 pm

hi,

mostly the old basic include command contains a serial of routines that you can use in different programs.
So you have only put in the include command at the start of the program and you got your universal routines and constants.
include "myfunctions.bas"

I build in the uses command wich can operate without an extension altough the file must have the lib extension and must be in the folder where fnxcompiler is.
you can easely use more files the syntax look like this
uses led,math,myform, etc.
It is shorter to type. An it include led.lib math.lib myform.lib wich could contain universal routines.

However you could use the command with whatever you like.

best regards  

Post Reply