Special Lecture on Multi-Scale Simulation: I tried to summarize the 5th

!ruby-2.5.5p157

ruby syntax (hello world)

Introduction

Since any programming language starts with hello world, we will learn various output functions through hello world.

How to launch Strings

First of all, beginners should basically remember one of the following

--print: Line break required --puts: Automatic line breaks --p: When debug launches instead during coding --pp: need pretty print of p, require'pp' --printf: Useful when adjusting the format

Of the above, I often use python, so I'm used to it, so I'll use ~ print ~

How to use print

Since print requires a line break, the character (\ n) for a line break is required as shown below.

print "Hello " + ARGV[0] + "\n"

Recommended Posts

Special Lecture on Multi-Scale Simulation: I tried to summarize the 5th
Special Lecture on Multi-Scale Simulation: I tried to summarize the 8th
Special Lecture on Multi-Scale Simulation: I tried to summarize the 7th
Special Lecture on Multi-Scale Simulation: 11th (class)
Special Lecture on Multiscale Simulation: 8th (assert)
Special Lecture on Multiscale Simulation: 10th (Recursive)
I tried to summarize the methods used
I tried to summarize the Stream API
I tried to summarize the state transition of docker
I tried to summarize the basics of kotlin and java
I tried to summarize the basic grammar of Ruby briefly
I tried to summarize iOS 14 support
I tried to explain the method
I tried to summarize Java learning (1)
I tried to summarize Java 8 now
I tried to summarize the words that I often see in docker-compose.yml
I tried to summarize what was asked at the site-java edition-
I tried to summarize the methods of Java String and StringBuilder
I tried to display the calendar on the Eclipse console using Java.
I tried to summarize Java lambda expressions
I tried to implement the Iterator pattern
I tried to build AdoptOpenjdk 11 on CentOS 7
What is Docker? I tried to summarize
I tried to summarize the stumbling points when developing an Android application
I tried to summarize the key points of gRPC design and development
[Introduction to Java] I tried to summarize the knowledge that I think is essential
[Ruby] I tried to summarize the methods that frequently appear in paiza
[Ruby] I tried to summarize the methods that frequently appear in paiza ②
I tried migrating the portfolio created on Vagrant to the Docker development environment
I tried to publish the reflex measurement application on the Google Play store
I tried to summarize about JVM / garbage collection
[Rails] I tried to raise the Rails version from 5.0 to 5.2
I tried to organize the session in Rails
[Must see !!!] I tried to summarize object orientation!
I tried to set tomcat to run the Servlet.
I tried to summarize again the devise that was difficult at first sight
[JavaScript] The strongest case when I tried to summarize the parts I do not understand
I tried to summarize the points to consider when acquiring location information with the iOS application ③
I tried to organize the cases used in programming
I tried to decorate the simple calendar a little
I tried to reduce the capacity of Spring Boot
The story that did not disappear when I tried to delete mysql on ubuntu
I tried to summarize various link_to used this time
I tried to summarize the points to consider when acquiring location information with the iOS application ②
I tried to implement the Euclidean algorithm in Java
I want to simplify the log output on Android
[Rails 6.0, Docker] I tried to summarize the Docker environment construction and commands necessary to create a portfolio
[For Swift beginners] I tried to summarize the messy layout cycle of ViewController and View
[Java] I tried to make a rock-paper-scissors game that beginners can run on the console.
I tried to introduce Bootstrap 4 to the Rails 6 app [for beginners]
I tried adding a separator line to TabLayout on Android
I tried to increase the processing speed with spiritual engineering
[JDBC] I tried to access the SQLite3 database from Java.
I want to use screen sharing on the login screen on Ubuntu 18
I was addicted to looping the Update statement on MyBatis
[Swift] I tried to implement the function of the vending machine
I tried to create React.js × TypeScript × Material-UI on docker environment
I tried to build the environment little by little using docker
I tried to summarize personally useful apps and development tools (development tools)
I want to put the JDK on my Mac PC
I tried to build the environment of WSL2 + Docker + VSCode