Post Reply 
HP Prime
09-02-2014, 08:22 AM (This post was last modified: 09-02-2014 08:24 AM by oldhpfan.)
Post: #22
RE: HP Prime
(09-01-2014 05:50 PM)gbh Wrote:  Okay; we're making progress. I appreciate all the help. I'll look into Pascal.

One important difference: Pascal is a strongly typed language, PPL is not.
so in PPL:
Local i;
i:=1;
i:=1.2;
i:="abc";

are all legal and ok to do.

In Pascal:
var i:int; //defines i as an integer variable
i:=1; //ok 1 is an integer
i:=1.1; //error 1.1 is a real number
i:="abc"; //error "abc" is a string

so when looking at program examples in Pascal keep this in mind. Strongly typed languages will tend to reduce programming errors, on the other hand you have to do type casts if you need to go from one thing to the other e.g. from a real to an integer, in PPL they are the same thing. It can be useful when writing non trivial programs in a PPL like language to adopt conventions such as appending something like _i to all variables that are supposed to be integers; _r to all variables that are supposed to be real; _s to all variables that are supposed to be stings, then if you find yourself doing something like pi_r:="3.14" than you need to ask yourself why you are assigning a string to something that is supposed to hold a real number.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP Prime - gbh - 08-30-2014, 02:44 AM
RE: HP Prime - Joe Horn - 08-30-2014, 04:20 AM
RE: HP Prime - gbh - 08-30-2014, 04:51 PM
RE: HP Prime - Tim Wessman - 08-31-2014, 02:33 PM
RE: HP Prime - lschroeder1947 - 08-31-2017, 09:59 AM
RE: HP Prime - DrD - 08-31-2017, 12:22 PM
RE: HP Prime - Hans S. - 08-31-2017, 08:49 PM
RE: HP Prime - lschroeder1947 - 09-01-2017, 10:26 AM
RE: HP Prime - sol740 - 08-30-2014, 08:32 PM
RE: HP Prime - eried - 08-30-2014, 09:32 PM
RE: HP Prime - Joe Horn - 08-30-2014, 10:04 PM
RE: HP Prime - walter b - 08-30-2014, 10:12 PM
RE: HP Prime - Joe Horn - 08-30-2014, 10:13 PM
RE: HP Prime - sol740 - 08-31-2014, 09:58 AM
RE: HP Prime - Michael de Estrada - 08-30-2014, 11:26 PM
RE: HP Prime - Mark Hardman - 08-31-2014, 12:40 AM
RE: HP Prime - toml_12953 - 09-10-2014, 03:10 PM
RE: HP Prime - gbh - 08-31-2014, 12:02 AM
RE: HP Prime - Michael de Estrada - 08-31-2014, 12:26 AM
RE: HP Prime - Mark Hardman - 08-31-2014, 12:33 AM
RE: HP Prime - gbh - 09-01-2014, 02:28 AM
RE: HP Prime - oldhpfan - 09-01-2014, 06:14 AM
RE: HP Prime - Tim Wessman - 09-01-2014, 03:42 PM
RE: HP Prime - cutterjohn - 09-05-2014, 08:48 PM
RE: HP Prime - Joe Horn - 09-05-2014, 11:44 PM
RE: HP Prime - cutterjohn - 09-14-2014, 02:40 PM
RE: HP Prime - parisse - 09-06-2014, 06:47 AM
RE: HP Prime - gbh - 09-01-2014, 05:50 PM
RE: HP Prime - walter b - 09-01-2014, 06:42 PM
RE: HP Prime - oldhpfan - 09-02-2014 08:22 AM
RE: HP Prime - Joe Horn - 09-02-2014, 04:26 PM
RE: HP Prime - oldhpfan - 09-02-2014, 07:37 PM
RE: HP Prime - Joe Horn - 09-02-2014, 09:28 PM
RE: HP Prime - oldhpfan - 09-03-2014, 12:26 AM
RE: HP Prime - gbh - 09-01-2014, 07:35 PM
RE: HP Prime - walter b - 09-02-2014, 09:56 PM
RE: HP Prime - gbh - 09-02-2014, 03:50 PM
RE: HP Prime - oldhpfan - 09-02-2014, 07:55 PM
RE: HP Prime - oldhpfan - 09-06-2014, 02:31 AM
RE: HP Prime - gbh - 09-06-2014, 03:01 AM
RE: HP Prime - Han - 09-06-2014, 03:49 AM
RE: HP Prime - gbh - 09-06-2014, 06:07 PM
RE: HP Prime - oldhpfan - 09-06-2014, 03:27 AM
RE: HP Prime - Eddie W. Shore - 09-14-2014, 03:03 PM
RE: HP Prime - dbbotkin - 09-22-2014, 05:55 PM
RE: HP Prime - StephenG1CMZ - 05-24-2015, 07:07 PM
RE: HP Prime - toml_12953 - 08-31-2017, 07:50 AM
RE: HP Prime - EladLending - 08-30-2017, 05:00 PM
RE: HP Prime - DrD - 09-01-2017, 11:55 AM
RE: HP Prime - Hans S. - 09-01-2017, 07:18 PM
RE: HP Prime - lschroeder1947 - 09-02-2017, 10:00 AM
RE: HP Prime - DrD - 09-02-2017, 11:21 AM



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