| addcomma(x,nfrmt) |
function to format numbers as separated
digits.
The separator is specified by the LOCALE["THOUSANDS_SEP"]. If no value
is
specified by the LOCALE string,a comma, ',', is used. Note the function
could
be extended to also use the LOCALE speification for digit grouping,
LOCALE["GROUPING"].
Currently the function assumes a grouping of 3 digits for each
separated
group. |
| _common_capitalize_function_ |
This is a common function used by the next
two
functions |
| capitalize |
function to capitalize first letter of each
word
following one or more field separator characters and first leter of
first
word |
| capitalize_sentence |
function to capitalize first letter of each
word
following a period and one or more field separator characters |
| reverse |
function to reverse case of characters in
string
passed |
| compress |
function to remove all characters specified
in
second string from first string Note: if second string is a single character, then this function is the same as the built-in "remove" function. Example: remove all vowels from a string: compress(line,"AEIOUaeiou"); Example: to get the string to remove all consonents: local consonents = compress(POSIX[upper] >< POSIX[lower],"AEIOUaeiou"); |
| fmt_eng(n, R) |
Engineering notation. Number, n, is
displayed
as: 1: abs(n) > 0 ==> [DD]D.DDDeN where first two digits are not both zero 2: abs(n) < 1 ==> 0.[00]DDDDeN N is a multiple of 3. |
| function rnd(x,places) |
return 'x' rounded to 'places' past decimal
if
'places' < 0, return 'x' |
| function abs(x) |
return absolute value of 'x' |
| function sanity_check(n,i,pv,pmt,fv,check) |
function to perform sanity check on input
values. |
| function _A(eint,per) |
used by functions to compute financial values |
| function _B(eint,beg) |
used by functions to compute financial values |
| function _C(eint,pmt,beg) |
used by functions to compute financial values |
| function N() |
compute Number of Periods from preset data |
| function _N(nint,pv,pmt,fv,CF,PF,disc,bep) |
Compute number of periods from arguments
passed: 1. Nominal Interest 2. Present Value 3. Periodic Payment 4. Future Value |
| function I() |
compute Interest from preset data |
| function _I(per,pv,pmt,fv,CF,PF,disc,bep) |
Compute Nominal Interest from arguments
passed: 1. Number of periods 2. Present Value 3. Periodic Payment 4. Future Value |
| function PV() |
compute Present value from preset data |
| function _PV(per,nint,pmt,fv,CF,PF,disc,bep) |
Compute Present Value from arguments passed: 1. Number of periods 2. Nominal Interest 3. Periodic Payment 4. Future Value |
| function PMT() |
compute Periodic Payment from preset data |
| function _PMT(per,nint,pv,fv,CF,PF,disc,bep) |
Compute Periodic Payment from arguments
passed: 1. Number of periods 2. Nominal Interest 3. Present Value 4. Future Value |
| function FV() |
compute Future Value from preset data |
| function _FV(per,nint,pv,pmt,CF,PF,disc,bep) |
Compute Future Value from arguments passed: 1. Number of periods 2. Nominal Interest 3. Present Value 4. Periodic Payments |
| function nom_int(eint,CF,PF,disc) |
compute Nominal Interest Rate from Effective
Interest
Rate |
| function eff_int(nint,CF,PF,disc) |
Compute Effective Interest Rate from Nominal
Interest
Rate |
| function fi(per,eint,pv,pmt,fv,bep) |
calculation used in interest computation |
| function fip(per,eint,pv,pmt,fv,bep) |
calculation used in interest computation |
| function set_default() |
Set default values for financial variables |
| function Amortization(nint, n, pv, pmt, fv, CF, PF, disc, bep, Eff_Date_jdn, Init_Date_jdn, fix_pmt, option, summary, output_file) |
Compute amortization table from data passed. n == number of periods pv == present value pmt == periodic payment fv == future value CF == Compounding Frequency PF == Payment Frequency disc == discrete/continuous compounding bep == beginning/end of period payments Eff_Date_jdn == JDN of Effective date Init_Date_jdn== JDN of initial payment date fix_pmt == fixed payment or zero option == specify amortization options summary == TRUE/FALSE for summary output_file == output file name, null string uses stdout |
| gcd_si(k, l) |
compute the Greatest Common Divisor, gcd, of
two
signed integers, k and l |
| function frame() |
create frame for graph |
| function ticks() |
create tick marks for both axes |
| function label() |
center label under x-axis |
| function data() |
create data points |
| function draw() |
print graph from array |
| function xscale(x) |
scale x-value |
| function yscale(y) |
scale y-value |
| function plot(x,y,c) |
put character c in array |
| function splot(x,y,s) |
put string s in array |
| function
set_family_dates(tdate_yr,tdate_mn,tdate_dy) |
function to set dates for family occasions -
data
set by user - sorted by date |
| function
set_family_dates_sorted(tdate_yr,tdate_mn,tdate_dy) |
function to set dates for family occasions -
data
set by user - sorted alphabetically |
| function
set_National_Holiday_dates(tdate_yr,tdate_mn,tdate_dy) |
Compute National Holidays - USA |
| function
set_Religious_Holiday_dates(tdate_yr,tdate_mn,tdate_dy) |
Compute Religious Holidays (Christian and
Jewish) |
| function Holiday_dates(year) |
Compute Jewish Holiday Dates |
| function Holiday_dates_jdn(year) |
Used by above |
| function pass_over_day(year) |
Used by above |
| function JulianLeapYear(year) |
Used by function below to compute Easter date |
| function GregorianLeapYear(year) |
Used by function below to compute Easter date |
| function _JHSSB_(century) |
Used by function below to compute Easter date |
| function _JHSB_(year) |
Used by function below to compute Easter date |
| function _GEP_(year) |
Used by function below to compute Easter date |
| function Easter(year) |
Compute date of Easter |
| function auto_jdn(...) |
Automatically corrects for Gregorian or
Julian
calender. Returns JDN or calender date. Correct forms: auto_jdn or auto_jdn() --> returns JDN for current date auto_jdn(JDN) --> returns calender date for JDN passed auto_jdn(year,month,day) --> returns JDN for date passed |
| function Weekday_Following(yr,mon,day,wd) |
Returns the number of days from the date
passed
to the weekday specified and following the date passed. For example, if
the
date passed is 1999-4-1 (yyy-m-d), Thursday, and the weekday specified
is
Sunday, 3 is returned. If Friday had been specified, 1 would be
returned. The weekday is specified as an integer between 0 and 6 inclusive, with: 0 == Sunday 1 == Monday 2 == Tuesday 3 == Wednesday 4 == Thursday 5 == Friday 6 == Saturday |
| function Weekday_Preceeding(yr,mon,day,wd |
Returns the number of days from the date
passed
to the weekday specified and preceeding the date passed. For example,
if
the date passed is 1999-4-1 (yyyy-m-d), Thursday, and the weekday
specified
is Sunday, 4 is returned. If Friday had been specified, 6 would be
returned. The weekday is specified as an integer between 0 and 6 inclusive, with: 0 == Sunday 1 == Monday 2 == Tuesday 3 == Wednesday 4 == Thursday 5 == Friday 6 == Saturday |
| function WeekNumber(year,month,day) |
Returns the week number of the date passed.
The
week number is the week in the calender year in which the date falls. |
| function WeekDay(year,month,day) |
Day of week 0 == Sunday 1 == Monday 2 == Tueday 3 == Wednesday 4 == Thursday 5 == Friday 6 == Saturday |
| function MDY_to_DoC(Year, Month, Day) |
Day Of Century Function |
| function month_day_date(month,occur,dow,year) |
function to compute day of month for day
passed
as: month, 1 <= m <= 12 occurrence, 1 <= w <= 5 dow == day of week (0 == Sunday, 6 == Saturday) year e.g., want day of month for the second Thursday in September, pass: month == 9 occur == 2 dow == 4 year == 1996 returns: 12 |
| function last_dow_of_month(month,dow,year) |
function to compute day of month for dow
passed
as last dow in month dow == Day Of Week month, 1 ó month ó 12 dow, 0 ó dow ó 6 year ,e.g., for last thursday in month of October, 1996, pass: month == 10 dow == 4 year == 1996 returns: 31 |
| function roman_numeral(num) |
convert decimal number to roman numeral |
| function d_to_alpha |
convert decimal number to alphabetic number
-
useful if alphabetic page numbering wanted |
| function alpha_to_decimal |
convert alphanumeric to decimal number |
/***************************************************************************
* tmpfile_mod.c - description
* -------------------
* begin : Thu 29 Dec 2005 04:39:30 PM EST
* copyright : (C) 2005 by Terry D. Boldt
* email : fastsnip-wm1@yahoo.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/*
*
* QTAwk plugin function to create temporary file name for use
*/