forked from mouredev/roadmap-retos-programacion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/julia/edalmava.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Comentario de una línea en Julia | ||
|
||
#= | ||
Comentario de varias líneas en Julia | ||
=# | ||
|
||
#= | ||
Sitio oficial: https://julialang.org/ | ||
Documentación: https://docs.julialang.org/en/v1/ | ||
=# | ||
|
||
# Expresiones de Asignación | ||
# variable = valor | ||
|
||
# Tipos Primitivos | ||
|
||
# Tipos Enteros | ||
ent = 10 # Int32 o Int64 según el sistema | ||
ent = 3000000000 # Int64 | ||
# - Hexadecimales | ||
hex = 0x1 # UInt8 | ||
hex = 0x123 # UInt16 | ||
hex = 0x1234567 # UInt32 | ||
hex = 0x123456789abcdef # UInt64 | ||
# - Binarios | ||
bin = 0b10 | ||
# - Octales | ||
oct = 0o010 | ||
# - Booleanos | ||
verdadero = true # (1) | ||
falso = false # (0) | ||
|
||
# Tipo Punto Flotante | ||
flo = 1.0 # Float64 | ||
flo = -1.23 # Float64 | ||
flo = 1e10 # Float64 | ||
flo = 2.5e-4 # Float64 | ||
|
||
flo = 0.5f0 # Float32 - se cambia e por f | ||
|
||
# - Valores especiales de Punto Flotante | ||
infinito_positivo = Inf | ||
infinito_negativo = -Inf | ||
Not_a_Number = NaN | ||
|
||
# Strings | ||
# - Tipo Char | ||
car = 'X' | ||
unicode = '\u78' # Unicode \u seguido por los 4 digitos hexadecimales | ||
unicode = '\U10ffff' # o \U seguido por los 6 u 8 digitos hexadecimales | ||
# - Cadenas Básicas | ||
lenguaje = "Julia" | ||
|
||
# Constantes | ||
const gravedad = 9.8 | ||
const a, b = 1, 2 | ||
|
||
#print("¡Hola, ", lenguaje, "!") # Usando concatenación | ||
print("¡Hola, $(lenguaje)!") # Usando interpolación |