This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's
General Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.
Open Topic & United-TI Talk =>
General Open Topic
Author |
Message |
|
jakethepspguy
Advanced Newbie
Joined: 04 Aug 2008 Posts: 50
|
Posted: 31 Jan 2009 01:10:54 am Post subject: |
|
|
You see, people think that sub( can only have three arguments. Well I'm here to prove you wrong. Here are my findings.
sub(int,int,int,int) produces an argument error.
sub(String,int,String,int) produces an argument error.
sub(cos(),!) produces a syntax error |
|
Back to top |
|
|
ticalcnoah
Member
Joined: 28 Oct 2007 Posts: 153
|
Posted: 31 Jan 2009 01:18:48 am Post subject: |
|
|
jakethepspguy wrote: You see, people think that sub( can only have three arguments. Well I'm here to prove you wrong. Here are my findings.
sub(int,int,int,int) produces an argument error.
sub(String,int,String,int) produces an argument error.
sub(cos(),!) produces a syntax error
What the? |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 31 Jan 2009 04:19:37 am Post subject: |
|
|
One or three arguments is valid for sub() – sub(X) is treated as X% or X/100 on OS versions 1.15 and later, and then you have the documented use. Of course having any other number of arguments would give an argument error. I don't see the revelation here. In fact, choosing 2:Goto from the third line shows that there's a problem associated with cos(), which pretty much says nothing about the behavior of sub().
Going further, if you meant that we should provide a value for cos(), and yet see a syntax error anyway, then that's because of the order of operations: the interpreter will attempt "comma factorial" inside the function, which will obviously result in a syntax error. This can even be seen in tan(1,sin(270[font="times new roman"]°)!) – the sin() will come out to be negative one, and then when factorial is employed, it'll give a domain error. Using sin(90[font="times new roman"]°)! instead means the interpreter will successfully evaluate the argument, but then it realizes that it doesn't belong to the function. Make sense?
The one thing that I'm confused about is what you mean by "scroll the homescreen" in the title.
Last edited by Guest on 11 Jul 2010 06:35:12 pm; edited 1 time in total |
|
Back to top |
|
|
luby I want to go back to Philmont!!
Calc Guru
Joined: 23 Apr 2006 Posts: 1477
|
Posted: 04 Feb 2009 10:28:35 pm Post subject: |
|
|
Way to ruin a joke Goose. (we are in the humor forum btw) |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 05 Feb 2009 05:44:42 am Post subject: |
|
|
Haha, people who are learning the language will try it and end up disappointed! How hilarious?
*ahem* I guess it's just not my style of humor.
Last edited by Guest on 05 Feb 2009 05:59:32 am; edited 1 time in total |
|
Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page