Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.09 KB

foo-bar.md

File metadata and controls

32 lines (24 loc) · 1.09 KB

foo bar 之後

一般的範例程式裡面,常常會看到 foo bar 之類的命名。

這些變數又被稱為元語法(metasyntactic)變數。元語法的意思是,這些單字是用來暫時替代其他語法的變數,本身並沒有意義。像是數學上常常用字母x、y、z 來暫時替代某個數字一樣。

根據 RFC-3092:

foo /foo/ :

First on the standard list of metasyntactic variables used in syntax examples (bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud). [JARGON]

所以如果 foo bar 兩個變數還不夠用的話,之後可以用的變數依序為

  • baz
  • qux
  • quux
  • corge
  • grault
  • garply
  • waldo
  • fred
  • plugh
  • xyzzy
  • thud

沒什麼用的小知識,供大家參考。

參考資料: