Calendar: Difference between revisions
Content added Content deleted
Line 3,411: | Line 3,411: | ||
=={{header|FutureBasic}}== |
=={{header|FutureBasic}}== |
||
<lang futurebasic> |
<lang futurebasic>// Legacy version |
||
// Legacy version |
|||
window 1, @"Calendar", (0, 0, 520, 520 ) |
window 1, @"Calendar", (0, 0, 520, 520 ) |
||
Line 3,420: | Line 3,418: | ||
open "UNIX", 1,"cal 1969" |
open "UNIX", 1,"cal 1969" |
||
do |
do |
||
line input #1, a |
line input #1, a |
||
print a |
print a |
||
until eof(1) |
until eof(1) |
||
close 1 |
close 1 |
||
HandleEvents |
HandleEvents</lang> |
||
</lang> |
|||
<lang futurebasic> |
<lang futurebasic>// Modern version |
||
// Modern version |
|||
include "NSLog.incl" |
include "NSLog.incl" |
||
local fn RunCommand( command as CFStringRef ) as CFStringRef |
local fn RunCommand( command as CFStringRef ) as CFStringRef |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
fn TaskLaunch( tsk, NULL ) |
|||
⚫ | |||
fn |
CFDataRef dta = fn FileHandleReadDataToEndOfFile( fh, NULL ) |
||
⚫ | |||
CFDataRef dta = fn FileHandleReadDataToEndOfFile( fh, NULL ) |
|||
⚫ | |||
end fn = outputStr |
end fn = outputStr |
||
NSLog( @"%@", fn RunCommand( @"cal 1969" ) ) |
NSLog( @"%@", fn RunCommand( @"cal 1969" ) ) |
||
HandleEvents |
HandleEvents</lang> |
||
</lang> |
|||
Output of either version: |
Output of either version: |