본문 바로가기
카테고리 없음

stack overflow에서 질문하기

by JK77 2022. 1. 12.

많은 도움을 얻고 있는 stack overflow에 질문을 올려보기로 했습니다. 여기저기 찾아보니 성의없는 질문이나 이미 있는 질문들을 다시 올리면 쓴소리를 듣게되어 상처를 받을 수 있다고 하더군요..

 그래도 뭐 어쩌겠습니까? 코딩은 초보이고... 어디 물어볼때는 마땅치 않으니 욕을 먹을 때 먹더라고 일단은 부딪혀 봐야죠.. 영어는 중학수준이라 웹페이지는 크롬에서 한국어로 번역하고 질문은 파파고에서 번역하여 올려보았습니다.

 

올릴때 코드는 ```코드``` 형식으로 감싸야 하고 만약 내용부분에서 줄바꿈을 하고 싶다면 <br/>을 사용하면 됩니다.

stackoverflow에서 질문하기

아래처럼 질문을 올려 보았습니다.

타이틀은 'When calling the recursive function in Lua, print() does not seem to work properly' 이렇게 쓰고, 내용을 작성했습니다.

 

I am calling a recursive function in Lua. The results I want are as follows.

0.016666666666667<br/>
wait<br/>
0.033333333333333<br/>
wait<br/>
0.05<br/>
wait<br/>
0.066666666666667<br/>
wait<br/>
result

However, the results are as follows. 

0.016666666666667<br/>
0.033333333333333<br/>
0.05<br/>
0.066666666666667<br/>
result<br/>
wait<br/>
wait<br/>
wait<br/>

The code is as follows. I ask for your understanding first. I'm a beginner at Lua. And I looked for it a lot, but I couldn't get the answer I wanted. Can someone help me?

```
seconds = 0 
user_wait = function()
    
    seconds = seconds + (1/60)
    print(seconds)
    if seconds <= 3/60 then
      user_wait()
      print("wait")
    else
      seconds = 0
      print("result")
      return 1
    end
    
  end
  
  user_wait()
```

답변이 올까요~~ 쓴소리를 듣게될까요.. ㅠ

----------------------------------------------------

이틀뒤에 코멘트가 달렸고 쉽게 해결할 수 있었습니다. 스택오버플로 만세~~