lydiandy / vlang_note Goto Github PK
View Code? Open in Web Editor NEWV语言学习笔记
License: MIT License
V语言学习笔记
License: MIT License
之前的m := map {'one':1,'two':2,'three':3}
现在是m := {'one':1,'two':2,'three':3}
main.v:18:13: error: unknown method or field: BitField.all
.
5 possibilities: clear
, has
, is_empty
, set
, toggle
.
是all()方法取消了吗?
Which ide your chooses for vlang?
fn main(){
add(User{name:'jack',age:22}) //标准方式
add({name:'tom',age:23}) //简短方式,省略类型
add(name:'tt',age:33) //更简短的方式,省略类型和大括号,有命名参数调用的感觉
}
error: cannot initialize a struct with a map
结构体章节下有同样的内容
[params] 参数注解有和没有都能正常执行,这是为什么呢?
Looks good @lydiandy, I think translating this stuff to english using google translate should be straightforward :-)
👍
["Hello", "World", 0, 1, null]
h:=`湖`
println(h)
结果显示:150,"湖"实际的UTF-8十进制编码为:15120790,
试了下go:
arr := 'a'
arr2 := '湖'
fmt.Println(reflect.TypeOf(arr), arr)
fmt.Println(reflect.TypeOf(arr2), arr2)
结果:
int32 97
int32 28246
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.