Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Julia Cookbook

You're reading from  Julia Cookbook

Product type Book
Published in Sep 2016
Publisher
ISBN-13 9781785882012
Pages 172 pages
Edition 1st Edition
Languages
Authors (2):
Raj R Jalem Raj R Jalem
Jalem Raj Rohit Jalem Raj Rohit
Profile icon Jalem Raj Rohit
View More author details

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:

  • symbol("FirstName", 45)

    The output of the preceding command would look like this:

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

    The output of the preceding command would look like:

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 to create symbols. So, a symbol always...

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 $15.99/month. Cancel anytime}