Optionally a session may check for any updates for installed packages:


In [1]:
Pkg.update()


INFO: Updating METADATA...
INFO: Updating Geomechanics...
INFO: Updating ParSpMatVec...
INFO: Updating Stan...
INFO: Updating GLAbstraction...
INFO: Updating MeshIO...
INFO: Updating FixedSizeArrays...
INFO: Updating CSoM...
INFO: Updating TP...
INFO: Updating ModernGL...
INFO: Updating NMfE...
INFO: Updating ClassicalLaminateTheory...
INFO: Updating Plots...
INFO: Updating GeometryTypes...
INFO: Updating Gadfly...
INFO: Updating GLVisualize...
INFO: Updating Mustache...
INFO: Updating GLWindow...
INFO: Computing changes...
INFO: No packages to install, update or remove

A few very simple interactive REPL input lines:


In [2]:
1+1


Out[2]:
2

In [3]:
2^4


Out[3]:
16

In [4]:
x=5


Out[4]:
5

In [5]:
x^2


Out[5]:
25

In [6]:
y=x+6


Out[6]:
11

In [7]:
x=4


Out[7]:
4

In [8]:
y


Out[8]:
11

In [9]:
1


Out[9]:
1

In [10]:
bits(1)


Out[10]:
"0000000000000000000000000000000000000000000000000000000000000001"

In [11]:
bits(5)


Out[11]:
"0000000000000000000000000000000000000000000000000000000000000101"

In [12]:
length(bits(3))


Out[12]:
64

In [13]:
length(bits(5))/8


Out[13]:
8.0

Thus 64/8 returns a floating point value. Use the div() function or operator (enter by typing '\div' -no quotes- and press tab):


In [14]:
length(bits(5))÷8


Out[14]:
8

In [15]:
bits(-1)


Out[15]:
"1111111111111111111111111111111111111111111111111111111111111111"

There are many other completions as used above, e.g. \alpha and tab. Or to see possible completions, enter 'type' followed by tab. Select typemax.


In [16]:
typemax(Int64)


Out[16]:
9223372036854775807

In [17]:
largest_integer = ans


Out[17]:
9223372036854775807

In [18]:
bits(largest_integer)


Out[18]:
"0111111111111111111111111111111111111111111111111111111111111111"

In [19]:
bits(largest_integer+1)


Out[19]:
"1000000000000000000000000000000000000000000000000000000000000000"

In [20]:
largest_integer+1


Out[20]:
-9223372036854775808

In [21]:
#This is a comment, not evaluated

In [22]:
# largest_integer+1 is the smallest_integer

In [23]:
typemin(Int64)


Out[23]:
-9223372036854775808

In [24]:
UInt64(1)


Out[24]:
0x0000000000000001

In [25]:
2^63


Out[25]:
-9223372036854775808

In [26]:
bits(2^63)


Out[26]:
"1000000000000000000000000000000000000000000000000000000000000000"

In [27]:
bits(2^63+1)


Out[27]:
"1000000000000000000000000000000000000000000000000000000000000001"

In [ ]: