The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
one or two arguments
11-13-2022, 03:50 PM
Post: #1
one or two arguments
Good evening everyone,
I would like to write a small program that works like this:
suppose the program is called "metto"
and I want it to work with both one argument and two arguments. For instance:
"metto(a)" -> a ^ 2
"metto(a, b)" -> a * b
How can I program the "metto" instruction to accept one argument or also two arguments?
Thanks for the help, robmio
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
one or two arguments - robmio - 11-13-2022 03:50 PM
RE: one or two arguments - Didier Lachieze - 11-13-2022, 04:15 PM
RE: one or two arguments - robmio - 11-13-2022, 04:24 PM
RE: one or two arguments - ctrclckws - 11-13-2022, 04:44 PM
RE: one or two arguments - toml_12953 - 11-13-2022, 04:47 PM
RE: one or two arguments - robmio - 11-13-2022, 04:54 PM



User(s) browsing this thread: 2 Guest(s)