# How to add variable type in variable declaration in JuMP

**URL:** <https://discourse.julialang.org/t/how-to-add-variable-type-in-variable-declaration-in-jump/63444>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 23, 2021, 2:22pm UTC](https://discourse.julialang.org/t/how-to-add-variable-type-in-variable-declaration-in-jump/63444 "2021-06-23T14:22:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manoj.centura](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manoj.centura/32/216443_2.png) [@manoj.centura](https://discourse.julialang.org/u/manoj.centura)\
**Post date:** [June 23, 2021, 2:22pm UTC](https://discourse.julialang.org/t/how-to-add-variable-type-in-variable-declaration-in-jump/63444/1 "2021-06-23T14:22:46Z")

</div>

Hi All,

I want to add this variable as integer.  
Please suggest how to modify this.

X\_tbp = @variable(mod, [t in 1:T,b in 1:B, p in 1:P], base\_name=“X\_tbp”, lower\_bound=0.0)

Thanks

---

<div class="post-metadata">

**Author:** ![leethargo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leethargo/32/6004_2.png) [@leethargo](https://discourse.julialang.org/u/leethargo)\
**Post date:** [June 23, 2021, 3:23pm UTC](https://discourse.julialang.org/t/how-to-add-variable-type-in-variable-declaration-in-jump/63444/2 "2021-06-23T15:23:23Z")

</div>

Just add `Int` as an argument to the macro.

See the [example in the docs](https://jump.dev/JuMP.jl/stable/tutorials/Getting%20started/variables_constraints_objective/#Variable-types).
