Content deleted Content added
→Please update the release version.: new section |
syntaxhighlight & fix lint |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 1:
{{Talk header}}
{{WikiProject Computer science
{{WikiProject Computing
{{WikiProject C/C++|importance=Mid|c=yes}}
▲{{WikiProject C/C++|class=Start|importance=Mid|c=yes}}
}}
==run()==
Line 14 ⟶ 12:
If it should be as simple as possible, we should use something like this:
<
using GLib;
Line 20 ⟶ 18:
print ("Hello World\n");
}
</syntaxhighlight>
However, it would be useful to have a second example, then, that shows a bit more of the syntax.
[[User:Juergbi|Juergbi]] ([[User talk:Juergbi|talk]]) 14:14, 22 June 2008 (UTC)
::If it were to be as simple as possible you could drop the glib import and just have the one-liner:
<blockquote><blockquote><
void main() { print("Hello World\n"); }
</
::[[Special:Contributions/24.243.3.27|24.243.3.27]] ([[User talk:24.243.3.27|talk]]) 09:53, 19 October 2008 (UTC)
Line 64 ⟶ 62:
:Ps. As an example of how easy it is to wrap C libraries, one can copy the default glib-2.0.vapi somewhere and edit it to wrap g_chdir by putting the following code under the DirUtils namespace, then compiling with the switch --vapidir=/path/to/modified/vapi:
<blockquote><
[CCode (cname = "g_chdir")]
public static int chdir (string pathname);
</
:Which then be used from Vala code:
<blockquote><
DirUtils.chdir( "/foo/bar" );
</
:[[Special:Contributions/24.243.3.27|24.243.3.27]] ([[User talk:24.243.3.27|talk]]) 08:00, 22 September 2008 (UTC)
Line 147 ⟶ 145:
the line:
<syntaxhighlight lang="text">
stdout.printf("hello world!\n");
</
means that <code>stdout</code>, which is an instance of the streams class, which is capable to process the <code>printf("hello world!\n")</code> message.
Line 179 ⟶ 177:
—<span style="color:blue ; text-shadow: 0pt 1px 2px blue; font-style:italic">[[User: Wi24rd|wi24rd]]</span> <sup>[[User talk:wi24rd|<span style="color:purple; font-style:italic">leave a comment</span>]]</sup> 17:32, 13 February 2019 (UTC)
:You can do this yourself by simply editing the page. --[[User:Mjog|mjog]] ([[User talk:Mjog|talk]]) 00:45, 18 February 2020 (UTC)
== How should the infobox indicate there is a LTS version? ==
The current Vala versions are 0.46.9 (Stable) and 0.48.5 (LTS), both released on April 23, 2020. How can the infobox indicate there is a long-term support release? [[User:Kiamlaluno|Kiamlaluno]] ([[User talk:Kiamlaluno|talk]]) 11:57, 23 April 2020 (UTC)
|