This wiki is out of date, use the continuation of this wiki instead

Include

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:53, 19 March 2008 (edit)
212.123.12.180 (Talk)

← Previous diff
Revision as of 14:54, 19 March 2008 (edit) (undo)
212.123.12.180 (Talk)

Next diff →
Line 5: Line 5:
== Example == == Example ==
main.prg: main.prg:
-[code] 
 +<pre>
include "bar.inc"; include "bar.inc";
program foo; program foo;
Line 18: Line 18:
until(key(_esc)) until(key(_esc))
end end
- +</pre>
-[/code]+
bar.inc: bar.inc:
-[code] 
 +<pre>
int bar() int bar()
begin begin
return 5; return 5;
end end
- +</pre>
-[/code]+
== See also == == See also ==

Revision as of 14:54, 19 March 2008

Definition

Include files to the current file. These files (*.INC) contain code that gets appended to the current file.

Example

main.prg:

include "bar.inc";
program foo;
private
  int barcode;
begin
  write_int(0,100,100,&barcode);
  barcode = bar();
  repeat     
    frame; 
  until(key(_esc))
end  

bar.inc:

int bar()
begin
  return 5;
end

See also


Filetypes
FBMFGCFHFPGFPLINCMAPPALPNGPRG
Personal tools