# \[Solved\] Barrier to learning programming -- Learning how to use docs

**URL:** <https://community.haxe.org/t/solved-barrier-to-learning-programming-learning-how-to-use-docs/353>\
**Category:** Haxe\
**Created:** [January 24, 2018, 4:02pm UTC](https://community.haxe.org/t/solved-barrier-to-learning-programming-learning-how-to-use-docs/353 "2018-01-24T16:02:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AaronsConsole](https://community.haxe.org/user_avatar/community.haxe.org/aaronsconsole/32/252_2.png) [@AaronsConsole](https://community.haxe.org/u/AaronsConsole)\
**Post date:** [January 24, 2018, 4:02pm UTC](https://community.haxe.org/t/solved-barrier-to-learning-programming-learning-how-to-use-docs/353/1 "2018-01-24T16:02:19Z")

</div>

This is true for many languages I’ve looked at: If there are no example cases then I’m totally lost. I’ve even googled how to read docs and there is very little help.

So as a quick example, I want to do this:

class Test {  
static function main() {  
trace("Enter a number between 1 and 10: ");  
var entry = Sys.stdin().readLine();  
// Parse string to number and place into [new?] variable  
var newEntry = ???  
}  
}

According to the doc API’s I am lead to the Std page:  
[https://api.haxe.org/Std.html](https://api.haxe.org/Std.html)  
static parseInt (x:String):Null\<Int\>

How do you know what needs to be typed, what needs to be replaced, and what is there for information only.

---

<div class="post-metadata">

**Author:** ![AaronsConsole](https://community.haxe.org/user_avatar/community.haxe.org/aaronsconsole/32/252_2.png) [@AaronsConsole](https://community.haxe.org/u/AaronsConsole)\
**Post date:** [January 24, 2018, 5:21pm UTC](https://community.haxe.org/t/solved-barrier-to-learning-programming-learning-how-to-use-docs/353/2 "2018-01-24T17:21:31Z")

</div>

1. First, look at the API page that your code example falls into. In this example it’s “Std” class without the quotes.
2. Then add a dot “.”
3. “Static” is information. It is not typed.
4. “parseInt” is the method. Type without quotes.
5. Opening parenthesis.
6. Place your string in quotes or your variable that has string information. Replace “x:String” (expected input) completely.
7. Closing parenthesis
8. Everything to the right, including the “:”, is information (expected output) and is not to be typed.

So the final method looks like this  
`Std.parseInt(entry);`

If you want it to do something useful, assign it to a **new** variable:  
`var newEntry = Std.parseInt(entry);`

---

<div class="post-metadata">

**Author:** ![mark.knol](https://community.haxe.org/user_avatar/community.haxe.org/mark.knol/32/50_2.png) [@mark.knol](https://community.haxe.org/u/mark.knol)\
**Post date:** [January 26, 2018, 2:45pm UTC](https://community.haxe.org/t/solved-barrier-to-learning-programming-learning-how-to-use-docs/353/3 "2018-01-26T14:45:07Z")

</div>

You might want to check out the [beginner section](https://code.haxe.org/category/beginner/) on the code cookbook.

It has this article which demonstrates how you can deal with numbers:

> **[Using numbers - Beginner - Haxe programming language cookbook](https://code.haxe.org/category/beginner/numbers-floats-ints.html)**
>
> Define integers and floats:
