mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Release calc version 2.11.1
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1995 David I. Bell
|
||||
* Permission is granted to use, distribute, or modify this source,
|
||||
* provided that this copyright notice remains intact.
|
||||
*
|
||||
* Example program to use 'varargs'.
|
||||
*
|
||||
* Program to sum the cubes of all the specified numbers.
|
||||
*/
|
||||
|
||||
define sc()
|
||||
{
|
||||
local s, i;
|
||||
|
||||
s = 0;
|
||||
for (i = 1; i <= param(0); i++) {
|
||||
if (!isnum(param(i))) {
|
||||
print "parameter",i,"is not a number";
|
||||
continue;
|
||||
}
|
||||
s += param(i)^3;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
if (config("lib_debug") & 3) {
|
||||
print "sc(a, b, ...) defined";
|
||||
}
|
Reference in New Issue
Block a user