PLDB
Languages Features Creators Calendar CSV Resources Blog About Donate Add Language
GitHub icon

Pointers

< >
int *ptr;
Example from C#:
// Pointers supported only under certain conditions. // Get 16 bytes of memory from the process's unmanaged memory IntPtr pointer = System.Runtime.InteropServices.Marshal.AllocHGlobal(16);
Example from Go:
package main import "fmt" func main() { i, j := 42, 2701 p := &i // point to i fmt.Println(*p) // read i through the pointer *p = 21 // set i through the pointer fmt.Println(i) // see the new value of i p = &j // point to j *p = *p / 37 // divide j through the pointer fmt.Println(j) // see the new value of j }
Example from Felix:
var x = 1; &x <- 2;
Example from Jule:
let ptr: *int = nil
Example from Fortran 90:
type real_list_t real :: sample_data(100) type (real_list_t), pointer :: next => null () end type type (real_list_t), target :: my_real_list type (real_list_t), pointer :: real_list_temp real_list_temp => my_real_list do read (1,iostat=ioerr) real_list_temp%sample_data if (ioerr /= 0) exit allocate (real_list_temp%next) real_list_temp => real_list_temp%next end do

Languages with Pointers include C, C++, C#, Go, COBOL, Ada, Objective-C, Modula-2, Eiffel, D, Oberon, PL/I, C3, Oberon-2, FreeBASIC, Felix, Jule, BlitzMax, COMPONENT PASCAL, Dale, Fortran 90, Tick C, cooC, Real-Time Concurrent C, Modula-2+, PL/I-FORMAC

Languages without Pointers include Java, JavaScript, Python, TypeScript, Elixir, Cython, progsbase, Pizza, Deesel, Static Typescript

Read more about Pointers on the web: 1.

HTML of this page generated by Features.ts

hasPipes.html 路 hasPointers.html 路 hasPolymorphism.html

View source

PLDB - Build the next great programming language Search v2023 Day 157 Docs Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com