Talk:Vala (programming language): Difference between revisions

Content deleted Content added
m updating project banners per WT:WikiProject Software/Free and open-source software task force#Requested_move_23_December_2018, replaced: {{WPFS → {{WikiProject Free and open-source software
syntaxhighlight & fix lint
 
(7 intermediate revisions by 5 users not shown)
Line 1:
{{Talk header}}
{{WikiProject C/C++banner shell|class=Start|importance=Mid|c=yes}}
{{WikiProjectBannerShell|1=
{{WikiProject Computer science|class=Start|importance=Low}}
{{WikiProject Computing|class=Start|importance=Low|science=yes|science-importance=Low|free-software=yes|free-software-importance=Mid|software=yes}}
{{WikiProject Free and open-source software C/C++||classimportance=StartMid|importancec=Midyes}}
{{WikiProject C/C++|class=Start|importance=Mid|c=yes}}
}}
{{findsourcesnotice|programming language|Vala}}
 
==run()==
Line 14 ⟶ 12:
 
If it should be as simple as possible, we should use something like this:
<sourcesyntaxhighlight lang="csharp">
using GLib;
 
Line 20 ⟶ 18:
print ("Hello World\n");
}
</syntaxhighlight>
</source>
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><sourcesyntaxhighlight lang="csharp">
void main() { print("Hello World\n"); }
</sourcesyntaxhighlight></blockquote></blockquote>
 
::[[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><sourcesyntaxhighlight lang="csharp">
[CCode (cname = "g_chdir")]
public static int chdir (string pathname);
</sourcesyntaxhighlight></blockquote>
 
:Which then be used from Vala code:
 
<blockquote><sourcesyntaxhighlight lang="csharp">
DirUtils.chdir( "/foo/bar" );
</sourcesyntaxhighlight></blockquote>
 
:[[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">
<code>
stdout.printf("hello world!\n");
</codesyntaxhighlight>
 
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)