Update man page

This commit is contained in:
Dale Weiler 2013-05-29 11:29:52 +00:00
parent 6d6a2efada
commit 1b71caa1fe
2 changed files with 18 additions and 2 deletions

View file

@ -506,6 +506,18 @@ Example:
void printA() = #1; // the usual way
void printB() = #2-1; // with a constant expression
.Ed
.It Fl f Ns Cm return-assignments
Enabiling this option will allow assigning values or expressions to the
return keyword as if it were a local variable of the same type as the
function's signature's return type.
.Pp
Example:
.Bd -literal -offset indent
float bar() { return 1024; }
float fun() {
return = bar();
return; // returns value of bar
}
.El
.Sh OPTIMIZATIONS
.Bl -tag -width Ds

View file

@ -5,8 +5,12 @@ float f_float() {
}
vector f_vector() {
return = '1 2 3';
return = '2 3 4';
vector foo;
foo.x = f_float();
foo.y = f_float();
foo.z = f_float();
return = foo;
return;
}