1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: add syntax highlighting to a code snippet in the tutorials (#16331)

This commit is contained in:
Ted Stoychev 2022-11-04 17:01:25 +02:00 committed by GitHub
parent 4cabf709e1
commit 5933ab7158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,19 +108,19 @@ int usersapi_get_number_of_users() {
```
```
```v oksyntax
module usersapi
fn C.usersapi_create_user(name &i8, password &i8, age int)
pub fn f create_user(name &i8, password &i8, age int) {
C.usersapi_create_user(name, password, age)
pub fn create_user(name &i8, password &i8, age int) {
C.usersapi_create_user(name, password, age)
}
fn C.usersapi_get_number_of_users() int
pub fn f get_number_of_users() int {
return C.usersapi_get_number_of_users()
pub fn get_number_of_users() int {
return C.usersapi_get_number_of_users()
}
```
@ -335,4 +335,4 @@ I will also be publishing the same demo with Sqlite and Quake translation.
It's a huge milestone for V and gives V developers access to huge amounts of software
written in C.
We're very excited about this release.
We're very excited about this release.