`mut v :=` update examples

pull/748/head
Alexander Medvednikov 2019-06-28 15:24:46 +02:00
parent 77b6da23c4
commit 4aab26d3e3
3 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
import os import os
fn main() { fn main() {
mut path = 'cinderella.txt' mut path := 'cinderella.txt'
if os.args.len != 2 { if os.args.len != 2 {
println('usage: word_counter [text_file]') println('usage: word_counter [text_file]')
println('using $path') println('using $path')

View File

@ -105,8 +105,8 @@ pub fn new_shader(name string) Shader {
fragment_path := '${dir}${name}.frag' fragment_path := '${dir}${name}.frag'
println('shader path=$vertex_path,\n fpath="$fragment_path"') println('shader path=$vertex_path,\n fpath="$fragment_path"')
// vertex_src := os.read_file(vertex_path.trim_space()) // vertex_src := os.read_file(vertex_path.trim_space())
mut vertex_src = '' mut vertex_src := ''
mut fragment_src = '' mut fragment_src := ''
if name == 'text' { if name == 'text' {
vertex_src = TEXT_VERT vertex_src = TEXT_VERT
fragment_src = TEXT_FRAG fragment_src = TEXT_FRAG

View File

@ -46,7 +46,7 @@ fn C.curl_easy_strerror(curl voidptr) byteptr
fn C.curl_easy_perform(curl voidptr) C.CURLcode fn C.curl_easy_perform(curl voidptr) C.CURLcode
fn write_fn(contents byteptr, size, nmemb int, _mem *MemoryStruct) int { fn write_fn(contents byteptr, size, nmemb int, _mem *MemoryStruct) int {
mut mem = _mem mut mem := _mem
// # printf("size =%d nmemb=%d contents=%s\n", size, nmemb, contents); // # printf("size =%d nmemb=%d contents=%s\n", size, nmemb, contents);
realsize := size * nmemb// TODO size_t ? realsize := size * nmemb// TODO size_t ?
// if !isnil(mem.ws_func) { // if !isnil(mem.ws_func) {