Hello world/Newline omission: Difference between revisions
Content added Content deleted
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
No edit summary |
||
Line 506: | Line 506: | ||
=={{header|Frink}}== |
=={{header|Frink}}== |
||
<syntaxhighlight lang="frink">print["Goodbye, World!"]</syntaxhighlight> |
<syntaxhighlight lang="frink">print["Goodbye, World!"]</syntaxhighlight> |
||
=={{header|FutureBasic}}== |
|||
FB has several ways to suppress line feeds and/or carriage returns. A few are demonstrated here. |
|||
<syntaxhighlight lang="futurebasic"> |
|||
include "NSLog.incl" |
|||
print |
|||
// A semicolon will suppress a line feed in a print statement. |
|||
print "a, "; |
|||
print "b, "; |
|||
print "c" |
|||
print : print |
|||
// When logging, a \b (escaped b) appended to a string will suppress a line feed. |
|||
NSLog( @"d, \b" ) |
|||
NSLog( @"e, \b" ) |
|||
NSLog( @"f" ) |
|||
long i |
|||
CFMutableStringRef mutStr |
|||
mutStr = fn MutableStringWithCapacity(0) |
|||
// Feeds and returs can be easily omitted using a mutable string |
|||
for i = 1 to 99 |
|||
MutableStringAppendFormat( mutStr, @"%3ld, ", i ) |
|||
if ( i mod 10 == 0 ) then MutableStringAppendString( mutStr, @"\n" ) |
|||
if ( i == 99 ) then MutableStringAppendFormat( mutStr, @"%3ld", i + 1 ) |
|||
next |
|||
print mutStr |
|||
HandleEvents |
|||
</syntaxhighlight> |
|||
{{output}} |
|||
[[File:FB Supressed Line Feed.png]] |
|||
=={{header|Gambas}}== |
=={{header|Gambas}}== |