updated parsing on dist

This commit is contained in:
Greg Gauthier 2025-03-18 13:22:07 +00:00
parent f43498c9ad
commit e0e6895c75
3 changed files with 5 additions and 9 deletions

View File

@ -32,9 +32,9 @@ Call MathLoadFuncs
/* -oldradius = 6366710 */
googleradius = 6378137 /* -- Equatorial earth radius used by Google */
Say "Enter 4 values. (FROM) latitude longitude (TO) latitude longitude:"
Parse Value Linein() With flat flon tlat tlon
If (tlat<>'' & tlon<>'') Then Say Distance(flat,flon,tlat,tlon)
Say "Enter 4 values: FROM(latitude,longitude) TO(latitude,longitude)"
Parse Upper Value Linein() With "FROM(" flat "," flon ") TO(" tlat "," tlon ")"
If (tlat<>'' & tlon<>'') Then Say "Distance: "||Distance(flat,flon,tlat,tlon)
Do While Lines()>0
Parse Value Linein() With tlat tlon .
Say Distance(flat,flon,tlat,tlon)

6
projects/oorexx/hello.rex Normal file → Executable file
View File

@ -1,8 +1,4 @@
/* Rexx
call RxFuncAdd 'SysGetPid', 'rxunixsys', 'SysGetPid'
call RxFuncAdd 'SysGethostname', 'rxunixsys', 'SysGethostname'
call RxFuncAdd 'SysUname', 'rxunixsys', 'SysUname'
*/
#!/usr/bin/env rexx
Address system "pwd" with output stem pwd.
say pwd.1

View File

@ -1,5 +1,5 @@
#!/usr/bin/env rexx
parse source os
parse source os .
say os