Cadquos
Explore Marketplace Help
Register Sign In
Cadquos Development

Main Navigation

  • 🏠
    Dashboard
  • 🏢
    Organizations
    8
  • 📁
    Repositories
    8
  • 👥
    Team
  • 🗓️
    Calendar

Workspace

  • 📝
    작업메모
  • 🚀
    시작하기
  • 📝
    빠른 메모
  • 👻
    나의 공간
    3
  • 📝
    작업목록

  • Settings
  • Connections
  • Public Pages
  • Notifications
    3
  • Help Center

John Smith

john@example.com

ByoungSooPark/modeling-app
1
0
Fork 0
You've already forked modeling-app
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
538f3a322f9c76707acfa86f2032e8cd061b3b4e
modeling-app/rust/kcl-lib/tests/kw_fn/input.kcl

11 lines
124 B
Plaintext
Raw Normal View History

AST: Allow unlabeled kw args (#4686) When declaring a function, its first parameter is allowed to be prefixed with `@`. This means that when users call this function, they don't have to label this argument. Only the first parameter is allowed this prefix, no others. Part of https://github.com/KittyCAD/modeling-app/issues/4600
2024-12-06 15:44:39 -06:00
fn increment(@x) {
return x + 1
}
KCL keyword args: calling user-defined functions (#4722) Part of https://github.com/KittyCAD/modeling-app/issues/4600 You can now call a user-defined function via keyword args. E.g. ``` fn increment(@x) { return x + 1 } fn add(@x, delta) { return x + delta } two = increment(1) three = add(1, delta: 2) ```
2024-12-09 22:11:16 -06:00
fn add(@x, delta) {
return x + delta
}
AST: Allow unlabeled kw args (#4686) When declaring a function, its first parameter is allowed to be prefixed with `@`. This means that when users call this function, they don't have to label this argument. Only the first parameter is allowed this prefix, no others. Part of https://github.com/KittyCAD/modeling-app/issues/4600
2024-12-06 15:44:39 -06:00
two = increment(1)
KCL: Keyword fn args like "x = 1" not like "x: 1" (#4770) Aligns with how we're doing objects.
2024-12-12 11:53:35 -06:00
three = add(1, delta = 2)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0+dev-176-gd179de641c Page: 33ms Template: 1ms
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