Post Reply 
arg() crashes the emulator
02-25-2015, 02:54 PM
Post: #16
RE: arg() crashes the emulator
(02-25-2015 08:47 AM)salvomic Wrote:  
(02-25-2015 06:00 AM)Angus Wrote:  ... I did not find case and return in the help (case leads to help CASE), so could you point out what differs with them?

case/CASE
return/RETURN
mid/MID
(..)

You said these nuances are important to learn. Thank you

yes, thank you, it's important also for me, and, please, explain what is the difference between
RETURN f; / return f;
and
RETURN(f);
with ()

Salvo

Based on what I can observe, both return and RETURN are used to return a value; however, RETURN will also exit the current function/procedure whereas return does not. As for return 0 vs. return(0), I believe this is the same.

Code:
#cas
RETEXAMPLE():=
BEGIN
  IF 1>0 THEN
    return("Yes!");
  END;
  return("Reached end of program");
END;
#end

Compare the results in this program to one in which all the return commands are replaced by RETURN.

As for typing in commands in lower-case and having it appear on the screen in upper-case ... this is just a display effect that probably carried over from Home view. Differences between mid and MID are non-existent if there is no corresponding CAS command named mid. So in the CAS (or Home) view, mid() and MID() are the same commands as they will both be parsed to MID (since there is no CAS mid() command).

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
arg() crashes the emulator - Angus - 02-20-2015, 10:56 AM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 11:28 AM
RE: arg() crashes the emulator - Angus - 02-20-2015, 11:49 AM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 12:10 PM
RE: arg() crashes the emulator - dg1969 - 02-23-2015, 07:33 PM
RE: arg() crashes the emulator - Angus - 02-20-2015, 12:14 PM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 12:25 PM
RE: arg() crashes the emulator - Angus - 02-20-2015, 12:31 PM
RE: arg() crashes the emulator - salvomic - 02-20-2015, 01:43 PM
RE: arg() crashes the emulator - Angus - 02-24-2015, 06:19 AM
RE: arg() crashes the emulator - Han - 02-24-2015, 12:21 PM
RE: arg() crashes the emulator - Angus - 02-24-2015, 01:15 PM
RE: arg() crashes the emulator - Han - 02-24-2015, 03:24 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 06:00 AM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 08:47 AM
RE: arg() crashes the emulator - Han - 02-25-2015 02:54 PM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 07:01 PM
RE: arg() crashes the emulator - salvomic - 02-25-2015, 07:22 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 03:02 PM
RE: arg() crashes the emulator - Han - 02-25-2015, 04:02 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 04:13 PM
RE: arg() crashes the emulator - Han - 02-25-2015, 04:18 PM
RE: arg() crashes the emulator - Angus - 02-25-2015, 04:25 PM



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