Registrado: Noviembre 2014
Mensajes: 2565
Edad: 48 Ubicación:
Re: Uso De Fragmentos De Código O Snippets
Julio: estaba intentando hacer un post sobre este tema tan útil pero descubrí que tenes bien explicado del tema aquí hasta con un video.
Gracias por el aporte.
Registrado: Noviembre 2014
Mensajes: 2565
Edad: 48 Ubicación:
Re: Uso De Fragmentos De Código O Snippets
Alguien sabe si estos fragmentos de código estan en algun archivo de texto o algo parecido?
Me interesaría agregarlas a gambas-cheat-sheet.pdf que puse en el wiki hace un tiempo.
Registrado: Enero 2016
Mensajes: 311
Edad: 55 Ubicación: En un lugar de La Mancha de cuyo nombre me acuerdo perfectamente...
Re: Uso De Fragmentos De Código O Snippets
tincho escribió:
Alguien sabe si estos fragmentos de código estan en algun archivo de texto o algo parecido?
Me interesaría agregarlas a gambas-cheat-sheet.pdf que puse en el wiki hace un tiempo.
Saludos.
Sí en la propia ayuda de gambas. Lo busco cuando tenga un rato y te lo indico.
[Snippets]
Count=43
Snippet[1]="fo\nFor ${1:Var} = ${2:Start} To ${3:End}\n ${}\nNext"
Snippet[2]="fe\nFor Each ${1:Var} In ${2:Collection}\n ${}\nNext"
Snippet[3]="if\nIf ${1:Test} Then\n ${}\nEndif"
Snippet[4]="ie\nIf ${1:Test} Then\n ${2}\nElse\n ${3}\nEndif"
Snippet[5]="ps\nPublic Sub ${1:Name}(${2:Arguments})\n\n ${}\n\nEnd"
Snippet[6]="pf\nPublic Function ${1:Name}(${2:Arguments}) As ${3:ReturnType}\n\n ${}\n\nEnd"
Snippet[7]="sps\nStatic Public Sub ${1:Name}(${2:Arguments})\n\n ${}\n\nEnd"
Snippet[8]="spf\nStatic Public Function ${1:Name}(${2:Arguments}) As ${3:ReturnType}\n\n ${}\n\nEnd"
Snippet[9]="s\nPrivate Sub ${1:Name}(${2:Arguments})\n\n ${}\n\nEnd"
Snippet[10]="f\nPrivate Function ${1:Name}(${2:Arguments}) As ${3:ReturnType}\n\n ${}\n\nEnd"
Snippet[11]="ss\nStatic Private Sub ${1:Name}(${2:Arguments})\n\n ${}\n\nEnd"
Snippet[12]="sf\nStatic Private Function ${1:Name}(${2:Arguments}) As ${3:ReturnType}\n\n ${}\n\nEnd"
Snippet[13]="d\nDim ${1:Var} As ${2:Type}"
Snippet[14]="v\nPrivate $${1:Var} As ${2:Type}"
Snippet[15]="pv\nPublic ${1:Var} As ${2:Type}"
Snippet[16]="spv\nStatic Public ${1:Var} As ${2:Type}"
Snippet[17]="sv\nStatic Private $${1:Var} As ${2:Type}"
Snippet[18]="pc\nPublic Const ${1:Name} As ${2:Type} = ${3:Value}"
Snippet[19]="c\nPrivate Const ${1:Name} As ${2:Type} = ${3:Value}"
Snippet[20]="p\nProperty ${1:Name} As ${2:Type}"
Snippet[21]="pr\nProperty Read ${1:Name} As ${2:Type}"
Snippet[22]="sp\nStatic Property ${1:Name} As ${2:Type}"
Snippet[23]="spr\nStatic Property Read ${1:Name} As ${2:Type}"
Snippet[24]="wh\nWhile ${1:Test}\n ${}\nWend"
Snippet[25]="re\nRepeat\n ${}\nUntil ${1:Test}"
Snippet[26]="do\nDo\n ${}\nLoop"
Snippet[27]="w\nWith ${1:Expression}\n ${}\nEnd With"
Snippet[28]="op\n${1:File} = Open ${2:Path} For ${3:Mode}"
Snippet[29]="se\nSelect ${1:Expression}\n Case ${2:Compare}\n ${3}\n Case ${4:Compare}\n ${5}\n Default\n ${6}\nEnd Select"
Snippet[30]="_n\nPublic Sub _new(${1:Arguments})\n\n ${}\n\nEnd"
Snippet[31]="_g\nPublic Function _get(${1:Indexes}) As ${2:Type}\n\n ${}\n\nEnd"
Snippet[32]="_p\nPublic Sub _put(${1:Value} As ${2:Type}, ${3:Indexes})\n\n ${}\n\nEnd"
Snippet[33]="_c\nPublic Function _compare(${1:Other} As ${2:Type}) As Integer\n\n ${}\n\nEnd"
Snippet[34]="ev\nEvent ${1:Name}"
Snippet[35]="gpl\n'\n' ${1:$TITLE}\n' ${2:$DESCRIPTION}\n' \n' Copyright (C) ${3:$AUTHORS}\n'\n' This program is free software; you can redistribute it and/or modify\n' it under the terms of the GNU General Public License as published by\n' the Free Software Foundation; either version 2 of the License, or\n' (at your option) any later version.\n'\n' This program is distributed in the hope that it will be useful,\n' but WITHOUT ANY WARRANTY; without even the implied warranty of\n' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n' GNU General Public License for more details.\n'\n' You should have received a copy of the GNU General Public License\n' along with this program; if not, write to the Free Software\n' Foundation, Inc., 51 Franklin St, Fifth Floor, \n' Boston, MA 02110-1301 USA\n'\n"
Snippet[36]="main\nPublic Sub Main()\n\n ${}\n\nEnd\n"
Snippet[37]="r\nReturn "
Snippet[38]="di\nDim i${1:Var} As Integer"
Snippet[39]="db\nDim b${1:Var} As Boolean"
Snippet[40]="ds\nDim s${1:Var} As String"
Snippet[41]="dc\nDim c${1:Var} As Collection"
Snippet[42]="df\nDim f${1:Var} As Float"
Snippet[43]="da\nDim a${1:Var} As String[]"
Snippet[44]="vi\nPrivate $i${1:Var} As Integer"
Snippet[45]="vb\nPrivate $b${1:Var} As Boolean"
Snippet[46]="vs\nPrivate $s${1:Var} As String"
Snippet[47]="vc\nPrivate $c${1:Var} As Collection"
Snippet[48]="vf\nPrivate $f${1:Var} As Float"
Snippet[49]="sva\nStatic Private $a${1:Var} As String[]"
Snippet[50]="svi\nStatic Private $i${1:Var} As Integer"
Snippet[51]="svb\nStatic Private $b${1:Var} As Boolean"
Snippet[52]="svs\nStatic Private $s${1:Var} As String"
Snippet[53]="svc\nStatic Private $c${1:Var} As Collection"
Snippet[54]="svf\nStatic Private $f${1:Var} As Float"
Snippet[55]="sva\nStatic Private $a${1:Var} As String[]"
En el código fuente, en «Datos\tips\snippets»
última edición por Grandamakulo el Lunes, 19 Diciembre 2016, 23:49; editado 1 vez
Fecha y hora actual: Martes, 21 May 2024, 18:56 • Todas las horas son UTC + 1 Hora
Usuarios navegando en este tema: 0 registrados, 0 ocultos y 1 invitado Usuarios registrados conectados: Ninguno
Lista de permisos
Lista de permisos
No puede crear mensajes No puede responder temas No puede editar sus mensajes No puede borrar sus mensajes No puede votar en encuestas No puede adjuntar archivos Puede descargar archivos No puede publicar eventos en el calendario