X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Foperations.def;h=18ab4447c824032a7f896161c9fc760fa31a2d62;hb=adccf1932c84ccb435f14f60fdb4aaaf9fdc1e30;hp=471fa1d30d331c4cb6e924b6c6822dcbe4570bde;hpb=52c296b2b56751899e9d9fb8772135a5073d7168;p=pspp diff --git a/src/language/expressions/operations.def b/src/language/expressions/operations.def index 471fa1d30d..18ab4447c8 100644 --- a/src/language/expressions/operations.def +++ b/src/language/expressions/operations.def @@ -1,7 +1,7 @@ // -*- c -*- // // PSPP - a program for statistical analysis. -// Copyright (C) 2005, 2006, 2009, 2010, 2011, 2012, 2015 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2009, 2010, 2011, 2012, 2015, 2016 Free Software Foundation, Inc. // // 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 @@ -168,6 +168,11 @@ function MEAN.1 (a[n]) return mean; } +function MEDIAN.1 (a[n]) +{ + return median (a, n); +} + function MIN.1 (a[n]) { double min; @@ -399,7 +404,6 @@ function INDEX (string haystack, string needles, needle_len_d) } } - function RINDEX (string haystack, string needle) { if (needle.length == 0) @@ -504,6 +508,15 @@ absorb_miss string function LPAD (string s, n, string c) } } +string function REPLACE (string haystack, string needle, string replacement) + expression e; + = replace_string (e, haystack, needle, replacement, DBL_MAX); + +absorb_miss string function REPLACE (string haystack, string needle, + string replacement, n) + expression e; + = replace_string (e, haystack, needle, replacement, n); + absorb_miss string function RPAD (string s, n) expression e; {