help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Extramake loadable module library - sum, multiply and comparison functio


From: Tim Murphy
Subject: Extramake loadable module library - sum, multiply and comparison functions
Date: Mon, 9 Nov 2015 22:45:34 +0000

Hi,

I'd just like to mention that the extramake module library that I mentioned
some days ago now has a few new useful functions.

https://bitbucket.org/tnmurphy/extramake

$(sum <number> <number> .... <number> )
   finds the sum of a list of integers. Negative integers are allowed. Any
non-numeric characters will cause the empty string to be returned.

$(mul <n> <n> <n>)
  returns the result of multiplying a list of numbers. Overflow can occur.
The platform's "long long" is used. Negative numbers are ok.

$(lt x,y)
  returns 1 if x < y for integers x and y, empty string otherwise.

$(lte x,y)
  returns 1 if x <= y for integers x and y, empty string otherwise.

$(gt x,y)
  returns 1 if x >= y for integers x and y, empty string otherwise.

$(gte x,y)
  returns 1 if x >= y for integers x and y, empty string otherwise.

I am sorry to offend by adding possibly undesired numerical comparison
functions etc but I needed them once (trying to make sure commandlines
would fit the restrictions of the shell) so here they are to be ignored or
not as you wish.

I've been trying to add things that don't require a lot of fancy memory
allocation or any other complications but the things I'm thinking about
next are:

reduce - as in lisp
map  - as in lisp
find - finding files under a path.
mkdir - make directories (like mkdir -p) which can be important as a
companion to the $(file) function if you want to write a file to a specific
directory.


I'd love to know if there's anything else that might be wanted.  Criticism
would be welcome too.

Regards,

Tim


reply via email to

[Prev in Thread] Current Thread [Next in Thread]