List of all VEXCode?

I’m wondering if there’s a site that lists all the text code that can be used in V5 VEXCode. I know on the left hand side, I can see the code options. But I have encountered that I can use other code such as “random.randint.” This was not anywhere in the left-hand side list.

TIA!

1 Like

any code that isn’t specific to VEX is C++

VEXCode Classes and Library: https://api.vexcode.cloud/v5/html/index.html
This has classes, methods, and it also shows the files listed. As an addition, generally speaking, you can use almost all C++ methods by including their classes. For example, adding #include <cmath> will allow you to use std::abs() and std::cos().
C++ Library: https://en.cppreference.com/w/cpp/header

4 Likes

Uh Its pretty clear to me that he’s using vexcode python, since he mentioned using random.randint specifically.

The answer is that there are literally thousands of things you could use, which weren’t made by VEX for vexcode, so they can’t all go in the sidebar.

If you need to know specific information about any of the python standard-lib or built-ins (any of the functions or classes you can use outside of vex stuff) then the official Python docs are a great resource.

There is a pdf available containing info about all of these functions, but it’s around 1500 pages long iirc so you probably don’t want to read it all.

14 Likes

Oops, my apologies! I completely forgot VEXCode had Python. That explains the different syntax as well.

Thank you.

And thanks to everyone else for your contributions.

Don’t forget this is an embedded version of Python running on the V5, many standard Python features are included, but there’s a lot which isn’t. Using the console described here.

you can list the internal modules, it will show something like this.

MicroPython v1.12-143-g4def664-dirty on 2020-07-08; Vex V5 with Zynq (v0.2)
Type "help()" for more information.
>>> help('modules')
__main__          math              uarray            utime
_thread           micropython       ubinascii         utimeq
builtins          motorgroup        ucollections      vex
cmath             python_vm_init    urandom           vexdev
drivetrain        smartdrive        ure
gc                sys               ustruct
Plus any modules on the filesystem
>>> 

which shows a few more than you will see in the version that shipped a couple of weeks ago.

5 Likes