mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-17 04:21:01 +01:00
moved all math functions and operators to funcalls
So now if you want to add a new operator or math function all you have to do is to add it to func.go. Conpletion will be generated from it.
This commit is contained in:
10
util.go
10
util.go
@@ -17,7 +17,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package main
|
||||
|
||||
import "math"
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// find an item in a list
|
||||
func contains(s []string, e string) bool {
|
||||
@@ -55,3 +59,7 @@ func const2num(name string) float64 {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
func list2str(list Numbers) string {
|
||||
return strings.Trim(strings.Join(strings.Fields(fmt.Sprint(list)), " "), "[]")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user