UTF8 problem ?

2018-04-09 Thread k1attila1
Hi OS:Win10 (chcp 65001) It works well : var s:string s="almő" echo(s) result : "almő" It doesn't work : var s:string s="őalma" #first character UTF-8 echo(s) result : "" Than you Attila

Re: another pointer question

2018-02-24 Thread k1attila1
Thank both of you So this is the memory address of the first char : echo repr(cast[ptr char](addr(s1[0]))) and s1 is internally a pointer, but we can't handle it as a pointer thank you again

Re: another pointer question

2018-02-24 Thread k1attila1
thanks mashingan : But in which memory adress can i see 'a' ? ('a' is first character of "alma") ref 0042F8A8 --> 02670058"alma"

another pointer question

2018-02-24 Thread k1attila1
Hello Still the pointer problem I try this : var a1 : int = 111 echo repr(a1) echo repr(a1.addr()) var s1 : string = "alma" echo repr(s1) echo repr(s1.addr()) i get this : 111 < OK

Re: Basic pointer question

2018-02-22 Thread k1attila1
Ok thanks both of you to clarify this problem

Re: Basic pointer question

2018-02-22 Thread k1attila1
Thank you and i accept the second part of your answer, BUT the pointer isn't clear yet if you try the given example you see : a[0] ---> 'a' p[0] ---> 'a' too. <\-- why not similar thing like ('*'p)[0] because p and a are different things in GOLANG : > var s string = "alma" > p:=&s // fmt.P

Basic pointer question

2018-02-22 Thread k1attila1
Hello I have tried it : var a = "abc" p: ptr string echo(repr(a)) echo(repr(addr(a))) p = addr(a) #The question : why not p = a ? echo(repr(p)) echo(repr(addr(p))) echo(a[0]) echo(p[0])

Re: Echo and UTF8

2018-02-21 Thread k1attila1
Thanks DOM96 and Araq This Works

Echo and UTF8

2018-02-21 Thread k1attila1
Hi I'm absolute beginner with NIM - this is my first day, so maybe my question is amateur. I tried the next : echo "kőrte" (file is UTF8) & Win10 But i always get : kĹ‘rte What's wrong with it ? Thank you Attila