V (programming language): Difference between revisions

Content deleted Content added
m Name of method changed to fit the example given
Not a copyright violation. The the snippet of code is too short and too functional to be copyrighted.
Line 144:
 
Optional types may represent {{code|none}}. Option types prepend {{code|?}} to the type name: {{code|?Type}}.<ref name="Knott"/><ref name="section"/>{{Sfn|Tsoukalos|2022}}
{{Copyvio|timestamp=20250715164557 |url=https://docs.vlang.io/type-declarations.html#optionresult-types-and-error-handling}}
<syntaxhighlight lang="V">
fn something(t string) !string {