Comments on: Example of a minimal module
Ok, you've heard about REBOL modules, and we've made a lot of changes recently... but, you're not really sure how to make one. Here's an example. It's very simple.
First, create a module file. This one is saved as simple.reb:
title: "Simple module"
export num: 1234
export sum: func ["Example" val] [val + num]
Notice it look like a normal script, but we specify the type module and the word export is used to indicate exported words.
Now, in your program, you can either import the module:
Or, another way is to specify it in the header of your program:
title: "Main program"
Then you can easily access the exported functions and data of the module:
Of course, this is just scratching the surface of what modules can do. But, I wanted to start with a simple example to show how easy it is to get going. It's that easy.
|Louis Vuitton bags outle
Visit buyIf want to know where you want to buy Louis Vuitton bags outlet sale, you can use online resources Designer Louis Vuitton bags outlet sale visit descriptions of the Louis Vuitton bags and the big guy for the different costs and other accessories. You can find the online destination and Overstock Handbagcrew reduced price handbags and designer handbags. Check out other great creators of these pages that have the same quality and you will be able to see, how much to save - prices really have to pay a department store shopping at this site is much more normal. Have fun while you shop Louis Vuitton bags outlet sale!
|Supra shoes for girls
The Supra shoes for girls Asia this training camp lineup,More than 50 players from China, Hong Kong, China, Chinese Taipei, Japan, Korea, Australia and other countries and regions,Players in the Supra shoes for girls list, we are familiar with the noble, Supra shoes for girls and consultant in the lineup, not only have Yi Jianlian, Gay and DeRozan and the other two NBA players, as well as the former coach of the United Arab O'Connor, and Chinese star Du Feng and so on.
Post a Comment:
You can post a comment here. Keep it on-topic.