簡體   English   中英

是什么啟發了Ruby的=開始.. =結束注釋塊語法?

[英]What inspired Ruby's =begin .. =end comment block syntax?

我知道很多Ruby都受到Perl(例如STDIN作為全局常量)或Unix shell(例如<<END heredoc語法)的啟發。 但我不知道塊注釋語法的來源。 語法:

=begin
This is a comment line
it explains that the next line of code displays 
a welcome message
=end

這是從哪里來的? 我對Perl的了解很粗略。 它是Perl嗎?

是的,這是Perl

Perl使用

=begin
This is a comment line
it explains that the next line of code displays 
a welcome message
=cut

看看這里: http//en.wikipedia.org/wiki/Comparison_of_programming_languages_(syntax)#Comments

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM