Latest from Indian Defence..

Saturday, December 5, 2009

Constants

The name tells'em all :

  • e -- the base of natural logarithms
  • pi -- the ratio of the circumference of a circle to its diameter
  • Inf, inf -- infinity (∞)
  • true, false -- boolean or logical truth values

octave:36> e

ans = 2.7183

octave:37> pi

ans = 3.1416

octave:38> inf

ans = Inf

octave:39> Inf

ans = Inf

octave:40> zero

octave:40>error: `zero' undefined near line 40 column 1

true

ans = 1

octave:41> false

ans = 0

octave:42>



Well, off the topic, we made a new discovery, observe the commands 40, 40 and 41.


"What!! It shud have been 40,41,42 right??"


Yes, indeed, but it means that the line numbers are allotted only to "successful commands", and not the ones resulting in error..... :)



No comments:

Post a Comment

So, ready to fumble ?? :)