Logo
Explore Help
Sign In
intercal/not-python
1
0
Fork 0
You've already forked not-python
Code Issues Pull Requests Releases Wiki Activity
Files
0d6f68216be967ac80343aac4f105332492b1a58
not-python/examples/expr.not

12 lines
171 B
Plaintext
Raw Normal View History

Add hypothetical "pow" function syntax includes function declaration syntax + ternary expression syntax Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-17 13:31:41 -07:00
# pow = (n, p) {
# p == 0
# ?? 1
# !! n * pow(n, p - 1)
# }
Add rerun_except crate, and small example code * rerun_except will ensure a build doesn't rerun if a *.not file is modified, which it would otherwise do * Add examples/expr.not with some basic assignment statements and function calls Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-17 13:26:38 -07:00
kilo = pow(2, 10)
mega = pow(2, 20)
giga = pow(2, 30)
tera = pow(2, 40)
peta = pow(2, 50)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 35ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API