Added several conversion funcions, plus minor updates

Added several conversion functions:

    Added builtin functions to convert between degrees and
    degrees, minutes and seconds under the config("mod")
    round rules:

	d2dms(degs, d, m, s [,rnd]) - given degs, compute d, m, s
	d2dm(degs, d, m [,rnd]) - given degs, compute d, m

	See help/d2dms and help/d2dm.

    Example:

	; print d2dms(360.321,deg=,min=,sec=), deg, min, sec;
	0.321 0 19 15.6

	; print d2dm(360.321,deg=,min=), deg, min;
	0.321 0 19.26

    Added builtin functions to convert between gradians and
    gradians, minutes and seconds under the config("mod")
    round rules:

	g2gms(grads, g, m, s [,rnd]) - given grads, compute g, m, s
	g2gm(grads, g, m [,rnd]) - given grads, compute g, m

	See help/g2gms and help/g2gm.

    Example:

	; print g2gms(400.321,grad=,min=,sec=), grad, min, sec;
	0.321 0 19 15.6

	; print g2gm(400.321,grad=,min=), grad, min;
	0.321 0 19.26

    Added builtin functions to convert between hours and
    hours, minutes and seconds under the config("mod")
    round rules:

	h2hms(hours, h, m, s [,rnd]) - given hours, compute h, m, s
	h2hm(hours, h, m [,rnd]) - given hours, compute h, m

	See help/h2hms and help/h2hm.

    Example:

	; print h2hms(24.321,hour=,min=,sec=), hour, min, sec;
	0.321 0 19 15.6

	; print h2hm(24.321,hour=,min=), hour, min;
	0.321 0 19.26

In addtion:

    Renumbered regression tests 3408 thru 3437, to 9102 thru 9131.

    Updated Added hms.cal resource file to use h2hms() builtin.
    Updated Added dms.cal resource file to use d2dms() builtin.

    Fix minor typo in help/mod SYNOPSIS.
    Fix minor typo in help/quo SYNOPSIS.

    Added a few more examples to help/strcmp.
This commit is contained in:
Landon Curt Noll
2021-09-26 04:38:09 -07:00
parent abf39b34b6
commit cf419fb329
20 changed files with 1836 additions and 138 deletions

View File

@@ -364,32 +364,33 @@ DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address agd \
append appr arg argv arrow asec asech asin asinh assign atan atan2 \
atanh avg base base2 bernoulli bit blk blkcpy blkfree blocks bround \
btrunc calc_tty calclevel calcpath catalan ceil cfappr cfsim char \
cmdbuf cmp comb conj cos cosh cot coth count cp csc csch ctime d2g d2r \
delete den dereference det digit digits display dp epsilon errcount \
errmax errno error estr euler eval exp fact factor fclose fcnt feof \
ferror fflush fgetc fgetfield fgetfile fgetline fgets fgetstr fib \
files floor fopen forall fpathopen fprintf fputc fputs fputstr frac \
free freebernoulli freeeuler freeglobals freeredc freestatics frem \
freopen fscan fscanf fseek fsize ftell g2d g2r gcd gcdrem gd \
getenv hash head highbit hmean hnrmod hypot ilog ilog10 ilog2 im \
indices inputlevel insert int inverse iroot isalnum isalpha isassoc \
isatty isblk iscntrl isconfig isdefined isdigit iserror iseven isfile \
isgraph ishash isident isint islist islower ismat ismult isnull isnum \
isobj isobjtype isodd isprime isprint isptr ispunct isqrt isrand \
israndom isreal isrel issimple isspace issq isstr istype isupper \
isxdigit jacobi join lcm lcmfact lfactor ln log lowbit ltol makelist \
matdim matfill matmax matmin matsum mattrace mattrans max memsize meq \
min minv mmin mne mod modify name near newerror nextcand nextprime \
norm null num oldvalue ord param perm pfact pi pix places pmod polar \
poly pop popcnt pound power prevcand prevprime printf prompt protect \
ptest push putenv quo quomod r2d r2g rand randbit random randombit \
randperm rcin rcmul rcout rcpow rcsq re remove reverse rewind rm root \
round rsearch runtime saveval scale scan scanf search sec sech seed \
segment select sgn sha1 sin sinh size sizeof sleep sort sqrt srand \
srandom ssq stoponerror str strcasecmp strcat strcmp strcpy strerror \
strlen strncasecmp strncmp strncpy strpos strprintf strscan strscanf \
strtolower strtoupper substr sum swap system systime tail tan tanh \
test time trunc usertime version xor
cmdbuf cmp comb conj cos cosh cot coth count cp csc csch ctime d2dm \
d2dms d2g d2r delete den dereference det digit digits display dp \
epsilon errcount errmax errno error estr euler eval exp fact factor \
fclose fcnt feof ferror fflush fgetc fgetfield fgetfile fgetline fgets \
fgetstr fib files floor fopen forall fpathopen fprintf fputc fputs \
fputstr frac free freebernoulli freeeuler freeglobals freeredc \
freestatics frem freopen fscan fscanf fseek fsize ftell g2d g2gm g2gms \
g2r gcd gcdrem gd getenv h2hm h2hms hash head highbit hmean hnrmod \
hypot ilog ilog10 ilog2 im indices inputlevel insert int inverse iroot \
isalnum isalpha isassoc isatty isblk iscntrl isconfig isdefined \
isdigit iserror iseven isfile isgraph ishash isident isint islist \
islower ismat ismult isnull isnum isobj isobjtype isodd isprime \
isprint isptr ispunct isqrt isrand israndom isreal isrel issimple \
isspace issq isstr istype isupper isxdigit jacobi join lcm lcmfact \
lfactor ln log lowbit ltol makelist matdim matfill matmax matmin \
matsum mattrace mattrans max memsize meq min minv mmin mne mod modify \
name near newerror nextcand nextprime norm null num oldvalue ord param \
perm pfact pi pix places pmod polar poly pop popcnt pound power \
prevcand prevprime printf prompt protect ptest push putenv quo quomod \
r2d r2g rand randbit random randombit randperm rcin rcmul rcout rcpow \
rcsq re remove reverse rewind rm root round rsearch runtime saveval \
scale scan scanf search sec sech seed segment select sgn sha1 sin sinh \
size sizeof sleep sort sqrt srand srandom ssq stoponerror str \
strcasecmp strcat strcmp strcpy strerror strlen strncasecmp strncmp \
strncpy strpos strprintf strscan strscanf strtolower strtoupper substr \
sum swap system systime tail tan tanh test time trunc usertime version \
xor
# This list is of files that are clones of DETAIL_HELP files. They are
# built from DETAIL_HELP files.