I’ll be doing an internship at the Selçuk University in Konya, Turkey for the next 11 weeks.
I’ll be doing an internship at the Selçuk University in Konya, Turkey for the next 11 weeks.
The dive site gets its name from the numerous ledges and cracks in the reef. The reef is composed mainly of hard corals including brain coral, starlet coral, smooth star coral and fragile saucer coral.
The ledge shelters green morays, hawksbill turtles and nurse sharks. Also look for the ever present large barracudas hovering in mid-water, hiding beneath the overhangs or following divers around.
In the ISO C standard of 1999, a macro can be declared to accept a variable number of arguments. This allows you for example to define the following debugging output macro:
1 2 3 4 5 6 7 8 9 |
/* Print debugging output, if DEBUG is defined */ #define DEBUG /* Debugging output macro */ #ifdef DEBUG #define debug(...) { (void) fprintf (stdout, __VA_ARGS__); } #else #define debug(...) ((void) 0) #endif |
To use the macro in your code, simply use it like printf:
debug("The Answer to the Ultimate Question is '%d'\n", answer); |
It is of course possible to achieve the same behaviour with a function, where you could wrap the call to fprintf between ifdef DEBUG and endif. But this has the overhead of calling a function, whereas the preprocessor replaces every occurrence of debug(...) by ((void) 0) if DEBUG is undefined.
Instead of defining DEBUG inside your code, you could also the -DDEBUG preprocessor option of GCC.
From Fort King is one of Tobago’s best preserved historical sites. It was built by the British in the 1700s when it was also captured and occupied by the French and renamed Fort Castries.
The road leading up to the Fort, passes by Tobago’s only Hospital, leading up to the top of the hill where the Fort is located. The views from the Fort provide the visitor with spectacular views over Scarborough and further north along the coastline.
The Maverick was originally called Scarlet Ibis and was previously a passenger, vehicle and cargo ferry that travelled between Trinidad and Tobago. Scarlet Ibis went into service in 1959 and was retired in 1975.
On April 7, 1997 it was scuttled by the Association of Tobago Dive Operators and now sits upright on a sandy sea bed at a depth of 30m. Before scuttling, the ship was thoroughly cleaned of oil and other pollutants, hatches and other entrapments were either removed or secured making all compartments of the ship completely accessible.
The hull and exposed decks are encrusted with red polyp octorals, tunicates, sponges and literally thousands of Atlantic thorny oysters.
While browsing EiffelZone for new Eiffel related releases, I stubled across Amber, an Eiffel-like scripting language.
The highlights of Amber are
The Amber Scripting Language is still experimental. Nevertheless, the included hand-crafted examples and test cases do work. Following is the “99 Bottles of Beer” implementation of Amber:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
-- Prints the song "99 Bottles of Beer"
-- See http://99-bottles-of-beer.net/
99.down_to(1, agent(n) do
print_line(bottles(n) & " on the wall, " & bottles(n) & ".")
if n = 0 then
print_line(
"Go to the store and buy some more ... 99 bottles of beer."
)
else
print("Take one down and pass it around, ")
print_line(bottles(n - 1) & " on the wall.\n")
end
end)
private
bottles(n)
is
if n = 0 then
"No more bottles of beer"
elseif n = 1 then
"1 bottle of beer"
else
n & " bottles of beer"
end
end
end |