Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDocumentation Run/Copy issues and Play Example issue #4163
Comments
|
Oops, nevermind. There is a dedicated issue tag for playground. Apologies. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


1. https://vlang.io/play
Example ( JSON decoding/encoding ):
Returns:
You just found a bug. V can't compile this program, but it should. Please create a GitHub issue.
Solution: ?
2. https://vlang.io/docs
fn main() { age = 21 }Using Run works perfectly.
But all other examples like Strings, ...
name := 'Bob' println('Hello, $name!') //$is used for string interpolation println(name.len) bobby := name + 'by' // + is used to concatenate strings println(bobby) // "Bobby" println(bobby[1..3]) // "ob" mut s := 'hello ' s += 'world' //+=is used to append to a string println(s) // "hello world"Will fail because of the lacking "fn main() {}" is not automatically applied.
Solution: Remove the few "fn main() {" from the first documentation examples and automatically add "fn main(){ // CODE// }" to the Javascript that copies the code to the Play section.