Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Julia Cookbook

You're reading from   Julia Cookbook Over 40 recipes to get you up and running with programming using Julia

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher
ISBN-13 9781785882012
Length 172 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Raj R Jalem Raj R Jalem
Author Profile Icon Raj R Jalem
Raj R Jalem
Jalem Raj Rohit Jalem Raj Rohit
Author Profile Icon Jalem Raj Rohit
Jalem Raj Rohit
Arrow right icon
View More author details
Toc

Symbols

Symbols are the basic blocks of expressions. They are used for concatenating two strings together. They are also used as interned strings while building expressions.

Getting ready

There aren't any major requirements for this chapter. The only requirement is that your Julia REPL should be up and running.

How to do it...

Symbols can take in some arguments and then return the concatenated string of the string representations of those arguments. This is an example of how you can do it in the REPL:

  • symbol("FirstName", "LastName")

    The output of the preceding command would look like this:

    How to do it...

  • symbol("FirstName", 45)

    The output of the preceding command would look like this:

    How to do it...

  • symbol("Foo", :Bar, 86)

    The output of the preceding command would look like:

    How to do it...

Symbols create interned strings that are used for building expressions. An interned string is an immutable string that is used during string processing for optimizing time and space. The character : is used...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime