Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 29, 2021. It is now read-only.

Pointers for Python. The helps us with pointers in the python language. But, the project is archived.

License

NotificationsYou must be signed in to change notification settings

code-roller/python-pointer-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pointers for Python

Usage

To create a newPointer:

importptrnum:int=10num_pointer:ptr.Pointer=ptr.Pointer(num)

To get the address and value that the pointer points to:

num_pointer_address:int=num_pointer.getAddress()num_pointer_value:int=num_pointer.getVal()

To perform calculations:

# += and -=num_pointer.increment()num_pointer_value_after_plus_equals:int=num_pointer.getVal()num_pointer.decrement()num_pointer_value_after_minus_equals:int=num_pointer.getVal()# + and -num_pointer.add(10)num_pointer_value_after_plus:int=num_pointer.getVal()num_pointer.sub(15)num_pointer_value_after_minus:int=num_pointer.getVal()# ==, !=, <, >, <= and >=other:int=15other_pointer:ptr.Pointer=ptr.Pointer(other)are_addresses_equal:bool=num_pointer.eqeq(other_pointer)are_addresses_not_equal:bool=num_pointer.ne(other_pointer)are_addresses_greater:bool=num_pointer.gt(other_pointer)are_addresses_less:bool=num_pointer.lt(other_pointer)are_addresses_less_or_equal:bool=num_pointer.lte(other_pointer)are_addresses_greater_or_equal:bool=num_pointer.gte(other_pointer)

Credits

Made by these members of the code roller team =D

About

Pointers for Python. The helps us with pointers in the python language. But, the project is archived.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp