Post Reply 
Head and Tail functions
10-10-2015, 10:52 PM
Post: #1
Head and Tail functions
How to use head and tail with strings inside a program?

It seems quite inconsistent:
Code:
HOME:
tail("hola"); // return empty matrix
head("hola"); // return the same string

Syntax error if used uppercades (with msgbox)

Code:
CAS:
tail("hola"); // correct
head("hola"); // correct

Weird error if used uppercased (no msgbox) but return:
of(["Error: Bad Argument Value"])

Inside a program it seems to work like as in HOME, with or without CAS. in front

My website: ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
10-11-2015, 06:03 AM
Post: #2
RE: Head and Tail functions
It seems to be a small bug here.
I hope it will be fixed soon, but now we can use a workaround for strings:
Code:
CHAR(head(ASC("hola")));
CHAR(tail(ASC("hola")));

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
10-12-2015, 06:43 AM (This post was last modified: 10-12-2015 06:44 AM by cyrille de brébisson.)
Post: #3
RE: Head and Tail functions
hello,

head and tail are CAS functions, so use of them for home/PPL stuff is "discouraged".

Assuming str contains your string, in home/PPL, str(1,1) will do a head and str(2,100000) a tail.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 




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